mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Call proper conversion function
This commit is contained in:
parent
1bd664b813
commit
d62166d5d7
2 changed files with 4 additions and 4 deletions
|
@ -203,7 +203,7 @@
|
|||
var
|
||||
(cond
|
||||
(arg-cust-type
|
||||
(if (= 3 (length arg-cust-type))
|
||||
(if (> (length arg-cust-type) 1)
|
||||
(set! arg-cust-convert #t))
|
||||
(car arg-cust-type))
|
||||
(else
|
||||
|
@ -249,8 +249,8 @@
|
|||
(hash-table-ref *foreign-types* (quote ,type)))))
|
||||
(pass-arg
|
||||
(if (and arg-cust-type
|
||||
(= 3 (length arg-cust-type)))
|
||||
`(,(caddr arg-cust-type) ,sym)
|
||||
(> (length arg-cust-type) 1))
|
||||
`(,(cadr arg-cust-type) ,sym)
|
||||
sym)) )
|
||||
(cons
|
||||
sym ;; Arg
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
;(c-define scm-strlen "int" "strlen" string)
|
||||
(c-define scm-strlend double "strlen" string)
|
||||
(c-define scm-strlen2 integer "strlen" my-string)
|
||||
(c-define scm-strlen3 integer "strlen" my-integer-as-string)
|
||||
(c-define scm-strlen3 integer "strlen" string-as-integer)
|
||||
|
||||
(test-group "foreign lambda"
|
||||
(test 15 (scm-strlen "testing 1, 2, 3"))
|
||||
|
|
Loading…
Add table
Reference in a new issue