diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-10-04 17:32:41 +0200 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-10-04 17:32:41 +0200 |
commit | 9a3ec83a6db3ca95be8a4bf11620f93bfa348a4b (patch) | |
tree | 6fa6a775c7c2bf974ccf5e6546f8bdee54c0e759 | |
parent | b8764bfc2acf5f569b864a8b30175d2285b529d7 (diff) |
Make type handling work on the GNU runtime again.
darcs-hash:fc311f5f95252858c3d57007d43f5eb327db7cd6
-rw-r--r-- | JOURNAL | 17 | ||||
-rw-r--r-- | Lisp/type-handling.lisp | 20 |
2 files changed, 25 insertions, 12 deletions
@@ -1,5 +1,22 @@ -*- mode: muse -*- +* 2007-10-04, 17:27:02 CEST + +** `char' Does Actually Indicate a Char, Sometimes + +The latest changes made the test cases fail on GNUstep/x86, which either +means that the PyObjC code is wrong, or the GNU runtime has very weird +calling conventions that use ints as wrappers for chars or something. +Anyway, I have reverted the changes for GNUstep and left them in place +for Mac OS X (but note that I left the PyObjC code as it is, which means +that libffi is still directed to treats chars as ints). As a result, +both NeXT/PowerPC and GNUstep/x86 work for now, but I'm uncertain about +the status of other architectures as well as calling methods with chars +and shorts as arguments, which I've got no test cases for. I'm not +confident that either GNUstep/PowerPC/SPARC/whatever or NeXT/x86 work +the way my code expects them to. + + * 2007-10-04, 16:52:32 CEST ** `char' Does Not Indicate a Char, Continued diff --git a/Lisp/type-handling.lisp b/Lisp/type-handling.lisp index abee5ae..44370d8 100644 --- a/Lisp/type-handling.lisp +++ b/Lisp/type-handling.lisp @@ -142,27 +142,23 @@ Returns: (VALUES typespec byte-position string-position)" (otherwise (prog1 (list (case init-char (#\B :boolean) ;XXX :int? - (#\c (if (or return-type-p - (eq +runtime-type+ :gnu) - (and (eq +runtime-type+ :next) + (#\c (if (and (eq +runtime-type+ :next) + (or return-type-p (featurep 'cffi-features:ppc32))) :int :char)) - (#\C (if (or return-type-p - (eq +runtime-type+ :gnu) - (and (eq +runtime-type+ :next) + (#\C (if (and (eq +runtime-type+ :next) + (or return-type-p (featurep 'cffi-features:ppc32))) :unsigned-int :unsigned-char)) - (#\s (if (or return-type-p - (eq +runtime-type+ :gnu) - (and (eq +runtime-type+ :next) + (#\s (if (and (eq +runtime-type+ :next) + (or return-type-p (featurep 'cffi-features:ppc32))) :int :short)) - (#\S (if (or return-type-p - (eq +runtime-type+ :gnu) - (and (eq +runtime-type+ :next) + (#\S (if (and (eq +runtime-type+ :next) + (or return-type-p (featurep 'cffi-features:ppc32))) :unsigned-int :unsigned-short)) |