Fix bug on chicken when pffi-define argument types is empty list
This commit is contained in:
parent
ae7e87105c
commit
ded10bc0f1
|
|
@ -60,7 +60,10 @@
|
|||
(scheme-name (list-ref expr 1))
|
||||
(c-name (symbol->string (cadr (list-ref expr 3))))
|
||||
(return-type (pffi-type->native-type (cadr (list-ref expr 4))))
|
||||
(argument-types (map pffi-type->native-type (cadr (list-ref expr 5)))))
|
||||
(argument-types (if (null? (cdr (list-ref expr 5)))
|
||||
(list)
|
||||
(map pffi-type->native-type
|
||||
(cadr (list-ref expr 5))))))
|
||||
(if (null? argument-types)
|
||||
`(define ,scheme-name
|
||||
(foreign-safe-lambda ,return-type ,c-name))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
(pffi-define-library pffi-libc-stdlib '("ffi.h") "ffi" '())
|
||||
|
||||
(define-record-type <pffi-struct>
|
||||
(struct-make c-type size pointer members)
|
||||
pffi-struct?
|
||||
|
|
|
|||
Loading…
Reference in New Issue