summaryrefslogtreecommitdiff
path: root/Lisp
diff options
context:
space:
mode:
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)