diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-02-19 15:30:01 +0100 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-02-19 15:30:01 +0100 |
commit | 50785250d73abef4b10f6435249de64a924af7ef (patch) | |
tree | 13077c6b971dc1a2fdd6a09e3d2f8806851cc78f | |
parent | 5def05d791dd159b314428f98c3060ae30cdd976 (diff) |
Add function POINTER.
darcs-hash:68f3e7d8ce27daf943059dab2663183de1f694c3
-rw-r--r-- | Lisp/libobjcl.lisp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Lisp/libobjcl.lisp b/Lisp/libobjcl.lisp index f68838c..0267f10 100644 --- a/Lisp/libobjcl.lisp +++ b/Lisp/libobjcl.lisp @@ -737,20 +737,24 @@ separating parts by hyphens works nicely in all of the `:INVERT`, (list (intern-selector-by-name (symbol-list->message-name selector-name))))) +(defun pointer (thing) + (etypecase thing + (c-pointer thing) + (c-pointer-wrapper (pointer-to thing)))) (defun object-is-class-p (obj) - (%objcl-object-is-class (pointer-to obj))) + (%objcl-object-is-class (pointer obj))) (defun object-is-meta-class-p (obj) - (%objcl-object-is-meta-class (pointer-to obj))) + (%objcl-object-is-meta-class (pointer obj))) (defun object-get-class (obj) (find-objc-class-by-name - (%objcl-class-name (%objcl-object-get-class (pointer-to obj))))) + (%objcl-class-name (%objcl-object-get-class (pointer obj))))) (defun object-get-meta-class (obj) (find-objc-meta-class-by-name - (%objcl-class-name (%objcl-object-get-class (pointer-to obj))))) + (%objcl-class-name (%objcl-object-get-class (pointer obj))))) (defun objcl-class-superclass/pointer (class-ptr) (let ((superclass-ptr (%objcl-class-superclass class-ptr))) |