summaryrefslogtreecommitdiff
path: root/Lisp/method-invocation.lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2007-09-21 14:41:15 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2007-09-21 14:41:15 +0200
commit4167e6b9ec7c144bf259a820d7c958ecf7632c3f (patch)
tree49ea779302dd9f5726e1bbdc3528c0973d28aace /Lisp/method-invocation.lisp
parentb8c9eac7390219c71b67c6022a1cf1203d609d87 (diff)
Prune yet another bunch of unused code chunks.
darcs-hash:b90a1129a53bdc6fb3762a0d37bb797711d7037e
Diffstat (limited to 'Lisp/method-invocation.lisp')
-rw-r--r--Lisp/method-invocation.lisp39
1 files changed, 0 insertions, 39 deletions
diff --git a/Lisp/method-invocation.lisp b/Lisp/method-invocation.lisp
index 5a7a719..6d0dc12 100644
--- a/Lisp/method-invocation.lisp
+++ b/Lisp/method-invocation.lisp
@@ -145,38 +145,6 @@ Returns: *result* --- the return value of the method invocation.
args))))
-(defmacro unsafe-primitive-invoke (receiver method-name return-type &rest args)
- (let ((real-return-type (if (member return-type '(id objc-class exception
- selector))
- :pointer
- return-type))
- (real-receiver (gensym))
- (real-selector (gensym))
- (selector (selector method-name)))
- `(progn
- (let ((,real-receiver ,receiver)
- (,real-selector (selector ,method-name)))
- (check-type ,real-receiver (or id objc-class exception)
- "an Objective C instance (ID, OBJC-CLASS or EXCEPTION)")
- (let ((method (get-method-implementation ,real-receiver ,real-selector))
- (objc-arglist (arglist->objc-arglist (list ,@args))))
- (unwind-protect
- (let ((return-value
- (apply-macro 'foreign-funcall-pointer method
- ()
- (append (list :pointer (pointer-to ,real-receiver))
- (list :pointer (pointer-to ,real-selector))
- objc-arglist
- (list ,real-return-type)))))
- ,(if (member return-type '(id objc-class exception selector))
- `(let (,@(when (constructor-name-p (selector-name selector))
- `((*skip-retaining* t))))
- (make-instance return-type
- :pointer return-value))
- `return-value))
- (dealloc-objc-arglist objc-arglist)))))))
-
-
(defun primitive-invoke (receiver method-name return-type &rest args)
"An invocation mechanism with ad-hoc argument conversion."
(with-foreign-string-pool (register-temporary-string)
@@ -470,13 +438,6 @@ Returns: *result* --- the return value of the method invocation.
;;; (@* "Helper functions")
-(defun dealloc-objc-arglist (objc-arglist)
- (do ((objc-arglist objc-arglist (cddr objc-arglist)))
- ((null objc-arglist))
- ;; (first objc-arglist) is a CFFI type name.
- (dealloc-obj-data (second objc-arglist))))
-
-
(defun constructor-name-p (method-name)
(flet ((method-name-starts-with (prefix)
(and (>= (length method-name) (length prefix))