From: Matt Birkholz Date: Thu, 3 Sep 2015 20:17:46 +0000 (-0700) Subject: ffi: Fix callouts that return a struct or union. X-Git-Tag: mit-scheme-pucked-9.2.12~376^2~28 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=aed45b8f8712c7f6a70e094cea62e5cb87aa38f0;p=mit-scheme.git ffi: Fix callouts that return a struct or union. I missed a hunk while porting Peter Feigl 's patch to commit cf1e855. --- diff --git a/src/ffi/generator.scm b/src/ffi/generator.scm index 7c6523da3..c06c25661 100644 --- a/src/ffi/generator.scm +++ b/src/ffi/generator.scm @@ -223,7 +223,10 @@ Scm_"name" (void) (define (callout-inits ret-ctype params includes) ;; Returns a multi-line string in C syntax for the Init section. - (let* ((alien-ret-arg? (ctype/pointer? (definite-ctype ret-ctype includes))) + (let* ((alien-ret-arg? (let ((definite (definite-ctype ret-ctype includes))) + (or (ctype/pointer? definite) + (ctype/struct? definite) + (ctype/union? definite)))) (nargs ;; (c-call 1:alien-function 2:ret-alien 3:arg1) ;; (c-call 1:alien-function 2:arg1)