Documentation update
Mon Oct 29 17:03:42 PDT 2007 matley@muppetslab.org
* Documentation update
diff -rN -u old-cl-objc/doc/cl-objc.texinfo new-cl-objc/doc/cl-objc.texinfo
--- old-cl-objc/doc/cl-objc.texinfo 2014-07-30 00:05:06.000000000 -0700
+++ new-cl-objc/doc/cl-objc.texinfo 2014-07-30 00:05:06.000000000 -0700
@@ -153,6 +153,24 @@
version of CFFI. You can get the development version from the darcs
repository at @uref{http://common-lisp.net/project/cffi/darcs/cffi/}.
+Furthermore CL-ObjC depends on some Common Lisp libraries, namingly
+
+* cl-yacc @*
+ http://www.pps.jussieu.fr/~jch/software/files/ @*
+ darcs at http://www.pps.jussieu.fr/~jch/software/repos/cl-yacc @*
+ asdf-installable
+
+* closer-mop @*
+ http://common-lisp.net/project/closer/ftp/ @*
+ darcs at http://common-lisp.net/project/closer/repos/closer-mop
+
+* memoize @*
+ http://www.common-lisp.net/project/asdf-packaging/memoize-latest.tar.gz @*
+ asdf-installable
+
+CL-ObjC is now alsow asdf-installable, so if you have asdf-install (),
+you can get it evaling (asdf-install:install 'cl-objc)
+
In order to work CL-ObjC needs to find the libobjc library. By default
it will search for it in /usr/lib. Change *foreign-library-directories*
if you want to load libobjc from a different path.
diff -rN -u old-cl-objc/src/clos.lisp new-cl-objc/src/clos.lisp
--- old-cl-objc/src/clos.lisp 2014-07-30 00:05:06.000000000 -0700
+++ new-cl-objc/src/clos.lisp 2014-07-30 00:05:06.000000000 -0700
@@ -25,6 +25,11 @@
(unless (fboundp 'objc-selector-to-clos-symbol)
(memoize:def-memoized-function objc-selector-to-clos-symbol (selector)
+ "Returns a symbol identifying the generic function binded to
+SELECTOR. Basically : becomes ? and camel case style is replaced
+by dash style. E.g.
+initWithUTF8String: becomes init-with-utf8-string?
+setX:Y: becomes set-x?y?"
(let* ((selector-symbols (objc-selector-to-symbols (sel-name selector)))
(tmp (subseq (reduce (lambda (s e) (concatenate 'string s "?" e))
(mapcar #'symbol-name selector-symbols) :initial-value "")
@@ -34,6 +39,7 @@
tmp))))
(defun clos-symbol-to-objc-selector (symbol)
+ "The inverse of OBJC-SELECTOR-TO-CLOS-SYMBOL."
(let* ((tmp (split-string (symbol-name symbol) #\?))
(selector-symbols (mapcar (lambda (part) (intern part
(if (and (= 1 (length tmp))
diff -rN -u old-cl-objc/src/packages.lisp new-cl-objc/src/packages.lisp
--- old-cl-objc/src/packages.lisp 2014-07-30 00:05:06.000000000 -0700
+++ new-cl-objc/src/packages.lisp 2014-07-30 00:05:06.000000000 -0700
@@ -116,6 +116,8 @@
"OBJC-CLOS-CLASS"
"OBJC-GENERIC-FUNCTION"
"*AUTOMATIC-CLOS-BINDINGS-UPDATE*"
+ "OBJC-SELECTOR-TO-CLOS-SYMBOL"
+ "CLOS-SYMBOL-TO-OBJC-SELECTOR"
"META"
"CONVERT-RESULT-FROM-OBJC"))
diff -rN -u old-cl-objc/src/structs.lisp new-cl-objc/src/structs.lisp
--- old-cl-objc/src/structs.lisp 2014-07-30 00:05:06.000000000 -0700
+++ new-cl-objc/src/structs.lisp 2014-07-30 00:05:06.000000000 -0700
@@ -140,6 +140,11 @@
collecting (list arg :int))))
(defmacro define-objc-function (name-and-options return-type &rest doc-and-args)
+ "Define an ObjC function. Use it instead of common CFFI:DEFCFUN
+when you have to handle structs by value passing and returning.
+Arguments NAME-AND-OPTIONS RETURN-TYPE and DOC-AND-ARGS are
+passed to CFFI:DEFCFUN. The name of the function will be exported
+in the current package"
(let* ((doc-string)
(args (if (stringp (car doc-and-args))
(progn