mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-06-23 06:16:40 +02:00
patch from kipples for ffi struct args (fixes issue #330)
This commit is contained in:
parent
25a8e4f11a
commit
cccfe33f7f
2 changed files with 2 additions and 3 deletions
|
@ -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))
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue