diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-14 01:30:38 +0200 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-14 01:30:38 +0200 |
commit | 5a5f58af31d62dfa87316cacfc7ff5e68da21284 (patch) | |
tree | a3f7457331fa26c9b8ff44dbda7b0807140fbeae | |
parent | df309e5a4372776aada9d27c9f8427609a824490 (diff) |
Support the “byref” qualifier in Objective-C typespecs.
darcs-hash:6fea2c9c3d2846ad443bce6e81ade475efb6e013
-rw-r--r-- | Lisp/tests.lisp | 10 | ||||
-rw-r--r-- | Lisp/type-conversion.lisp | 3 |
2 files changed, 9 insertions, 4 deletions
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)))) |