From 5a5f58af31d62dfa87316cacfc7ff5e68da21284 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Fri, 14 Sep 2007 01:30:38 +0200 Subject: =?UTF-8?q?Support=20the=20=E2=80=9Cbyref=E2=80=9D=20qualifier=20i?= =?UTF-8?q?n=20Objective-C=20typespecs.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit darcs-hash:6fea2c9c3d2846ad443bce6e81ade475efb6e013 --- Lisp/tests.lisp | 10 +++++++--- Lisp/type-conversion.lisp | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'Lisp') diff --git a/Lisp/tests.lisp b/Lisp/tests.lisp index 1404f86..38dd824 100644 --- a/Lisp/tests.lisp +++ b/Lisp/tests.lisp @@ -5,7 +5,7 @@ (:shadowing-import-from #:objcl #:struct #:union #:pointer #:oneway #:out #:in #:inout #:const #:parse-typespec #:objc-class - #:bit-field #:opaque)) + #:bit-field #:opaque #:bycopy #:byref)) (in-package #:mulk.objective-cl.tests) @@ -81,12 +81,16 @@ (:unsigned-int ()) (:unsigned-int ())))) ((ensure-same (parse-typespec "rnNoV^V[10rjd]4") - ;; Actually, the order of the qualifiers is not - ;; important, which means that this test is too dumb. + ;; Actually, the order of the qualifiers doesn't + ;; matter, which means that this test is dumber than + ;; it ought to be. '(pointer (oneway out inout in const) (array (oneway) 10 (complex (const) (:double nil)))))) + ((ensure-same (parse-typespec "ROi") + ;; Here, too, the order of the qualifiers is irrelevant. + '(:int (bycopy byref)))) ((ensure-same (parse-typespec "(?=)") '(union () "?"))) ((ensure-same (parse-typespec "{?=rb123rjf456iii}") diff --git a/Lisp/type-conversion.lisp b/Lisp/type-conversion.lisp index 715e906..d9a5431 100644 --- a/Lisp/type-conversion.lisp +++ b/Lisp/type-conversion.lisp @@ -96,7 +96,8 @@ Returns: (VALUES typespec byte-position string-position)" (#\N 'inout) (#\o 'out) (#\O 'bycopy) - (#\V 'oneway)))) + (#\V 'oneway) + (#\R 'byref)))) (and qualifier (incf string-position) (push qualifier qualifiers)))) -- cgit v1.2.3