diff --git a/tests/ffi/ffi-tests.scm b/tests/ffi/ffi-tests.scm index 846be137..bd48d936 100644 --- a/tests/ffi/ffi-tests.scm +++ b/tests/ffi/ffi-tests.scm @@ -284,8 +284,7 @@ double circle_area2(struct Circle circ) { ((struct Point) center circle-center) (double radius circle-radius)) (define-c double circle_area1 (Circle)) - ;; TODO: struct means no pointer - ;;(define-c double circle_area2 ((struct Circle))) + (define-c double circle_area2 ((struct Circle))) (define-c-type Color predicate: color?) (define-c void set_color (short short short (result pointer Color))) (define-c Color make_color (short short short)) diff --git a/tools/chibi-ffi b/tools/chibi-ffi index a1b6c073..5e3120b7 100755 --- a/tools/chibi-ffi +++ b/tools/chibi-ffi @@ -764,7 +764,7 @@ (void*? (void-pointer-type? type))) (cond ((or ctype void*?) - (cat (if (type-reference? type) "*" "") + (cat (if (or (type-struct? type) (type-reference? type)) "*" "") "(" (type-c-name type) ")" (if (type-null? type) "sexp_cpointer_maybe_null_value"