summaryrefslogtreecommitdiff
path: root/Lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-02-15 10:44:10 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-02-15 10:44:10 +0100
commit2e244d781b1b1096cddfd0df558ec7cee19b33a1 (patch)
tree577cbb7f02eebf2a6ebc5e21a051df55068547d9 /Lisp
parent63af3522ffbd5c3e1003a908d804c4e079d8f5e8 (diff)
System refactoring.
darcs-hash:961c2ecf3be60a2a4abcfd15f3e51b5ccfb163c0
Diffstat (limited to 'Lisp')
-rw-r--r--Lisp/internal-utilities.lisp16
-rw-r--r--Lisp/libobjcl.lisp16
2 files changed, 16 insertions, 16 deletions
diff --git a/Lisp/internal-utilities.lisp b/Lisp/internal-utilities.lisp
index 9be74a9..1c54068 100644
--- a/Lisp/internal-utilities.lisp
+++ b/Lisp/internal-utilities.lisp
@@ -27,22 +27,6 @@
(member symbol *features*))
-(defun objc-null (value)
- (or (null value)
- (and (typep value 'c-pointer-wrapper)
- (objc-pointer-null (pointer-to value)))))
-
-
-(defmacro objc-or (&rest forms)
- (let ((sym (gensym)))
- `(let ((,sym ,(first forms)))
- (if (objc-null ,sym)
- ,(if (rest forms)
- `(objc-or ,@(rest forms))
- 'nil)
- ,sym))))
-
-
(defmacro with-foreign-string-pool ((register-fn-name) &body body)
(let ((pool-var (gensym)))
`(let ((,pool-var (list)))
diff --git a/Lisp/libobjcl.lisp b/Lisp/libobjcl.lisp
index 0858cb9..89930b8 100644
--- a/Lisp/libobjcl.lisp
+++ b/Lisp/libobjcl.lisp
@@ -375,6 +375,22 @@ conventional case for namespace identifiers in Objective-C."
(cffi:pointer-eq pointer (objcl-get-nil))))
+(defun objc-null (value)
+ (or (null value)
+ (and (typep value 'c-pointer-wrapper)
+ (objc-pointer-null (pointer-to value)))))
+
+
+(defmacro objc-or (&rest forms)
+ (let ((sym (gensym)))
+ `(let ((,sym ,(first forms)))
+ (if (objc-null ,sym)
+ ,(if (rest forms)
+ `(objc-or ,@(rest forms))
+ 'nil)
+ ,sym))))
+
+
(declaim (ftype (function (string) (or null selector))
find-selector-by-name))
(defun find-selector-by-name (selector-name)