Support callbacks with void return types.
* Export SB-ALIEN:ALIEN-VOID-TYPE-P
* Bind *VALUES-TYPE-OKAY* to T when parsing of the return type
* Add test (+ another test for a x86-64 sign extension failure)
"ALIEN-VALUE" "ALIEN-VALUE-TYPE"
"ALIEN-VALUE-SAP" "ALIEN-VALUE-P"
"ALIEN-VALUES-TYPE" "ALIEN-VALUES-TYPE-P"
- "ALIEN-VALUES-TYPE-VALUES" "ALIGN-OFFSET" "COMPUTE-ALIEN-REP-TYPE"
+ "ALIEN-VALUES-TYPE-VALUES" "ALIGN-OFFSET" "ALIEN-VOID-TYPE-P"
+ "COMPUTE-ALIEN-REP-TYPE"
"COMPUTE-DEPORT-LAMBDA" "COMPUTE-DEPOSIT-LAMBDA"
"COMPUTE-EXTRACT-LAMBDA" "COMPUTE-LISP-REP-TYPE"
"COMPUTE-NATURALIZE-LAMBDA" "DEFINE-ALIEN-TYPE-CLASS"
(destructuring-bind (function result-type &rest argument-types)
specifier
(aver (eq 'function function))
- (values (parse-alien-type result-type env)
+ (values (let ((*values-type-okay* t))
+ (parse-alien-type result-type env))
(mapcar (lambda (spec)
(parse-alien-type spec env))
argument-types))))
(assert (= 26 (alien-funcall foo)))
+;;; callbacks with void return values
+
+(with-test (:name void-return)
+ (sb-alien::alien-lambda void ()
+ (values)))
+
+;;; tests for a sign extension problem in callback argument handling on x86-64
+
+(with-test (:name sign-extension :fails-on :x86-64)
+ (let ((*add-two-ints*
+ (sb-alien::alien-callback (function int int int) #'+)))
+ (assert (= (alien-funcall *add-two-ints* #x-80000000 1)
+ -2147483647))
+ (assert (= (alien-funcall *add-two-ints* #x-80000000 -1)
+ #x7fffffff))))
+
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.5.63"
+"0.9.5.64"