summaryrefslogtreecommitdiff
path: root/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
parentb8c9eac7390219c71b67c6022a1cf1203d609d87 (diff)
Prune yet another bunch of unused code chunks.
darcs-hash:b90a1129a53bdc6fb3762a0d37bb797711d7037e
Diffstat (limited to 'Lisp')
-rw-r--r--Lisp/internal-utilities.lisp23
-rw-r--r--Lisp/method-invocation.lisp39
2 files changed, 0 insertions, 62 deletions
diff --git a/Lisp/internal-utilities.lisp b/Lisp/internal-utilities.lisp
index 13d4e47..cf1c562 100644
--- a/Lisp/internal-utilities.lisp
+++ b/Lisp/internal-utilities.lisp
@@ -16,29 +16,6 @@
,@(car (last (cons arg args))))))))
-(defmacro with-foreign-conversion (bindings &body body)
- `(with-obj-data-values
- ,(mapcar #'(lambda (name-value-pair)
- (destructuring-bind (name value)
- name-value-pair
- `(,name (lisp->obj-data ,value))))
- bindings)
- ,@body))
-
-
-(defmacro with-obj-data-values (bindings &body body)
- `(let ,(mapcar #'(lambda (name-value-pair)
- (destructuring-bind (name value)
- name-value-pair
- `(,name ,value)))
- bindings)
- (unwind-protect
- (progn ,@body)
- ,@(mapcar #'(lambda (name-value-pair)
- `(dealloc-obj-data ,(first name-value-pair)))
- bindings))))
-
-
(defmacro with-foreign-string-pool ((register-fn-name) &body body)
(let ((pool-var (gensym)))
`(let ((,pool-var (list)))
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))