summaryrefslogtreecommitdiff
path: root/Lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2007-10-18 12:30:31 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2007-10-18 12:30:31 +0200
commitf97fad55542df30ece4e076ed31043124a0c67f8 (patch)
tree9151216abf0412c0f132db24f8fce5a0dfcec3d3 /Lisp
parentf28542b9b45f83250a6d01bc062b65244d166a1c (diff)
Improve CLISP compatibility.
darcs-hash:ed5c2f6e5f03f8adabfb89279d275a7ce88821c7
Diffstat (limited to 'Lisp')
-rw-r--r--Lisp/libobjcl.lisp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lisp/libobjcl.lisp b/Lisp/libobjcl.lisp
index c15282d..6c8469a 100644
--- a/Lisp/libobjcl.lisp
+++ b/Lisp/libobjcl.lisp
@@ -92,10 +92,15 @@
(defcfun ("objcl_alignof_type" %objcl-alignof-type) :long
(typespec :string))
-(defcfun objcl-get-nil :pointer)
+(defcfun ("objcl_get_nil" %objcl-get-nil) :pointer)
(defcfun objcl-get-yes :long)
(defcfun objcl-get-no :long)
+(defun objcl-get-nil ()
+ ;; %OBJCL-GET-NIL can return NIL for CLISP, which CFFI refuses to
+ ;; accept as an argument to POINTER-EQ. This is weird.
+ (or (%objcl-get-nil) (make-pointer 0)))
+
(defun initialise-runtime ()
"Initialise the Objective C runtime.