mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Rename macro to "c-define" per discussion w/Arthur
This commit is contained in:
parent
ebeb0e8651
commit
ca06ad2b0b
2 changed files with 5 additions and 5 deletions
|
@ -17,7 +17,7 @@
|
|||
(export
|
||||
c-code
|
||||
c-value
|
||||
c-defun
|
||||
c-define
|
||||
c->scm
|
||||
scm->c
|
||||
)
|
||||
|
@ -111,7 +111,7 @@
|
|||
(error "c->scm unable to convert C object of type " ,type)))))))
|
||||
|
||||
;(pretty-print (
|
||||
(define-syntax c-defun
|
||||
(define-syntax c-define
|
||||
(er-macro-transformer
|
||||
(lambda (expr rename compare)
|
||||
(let* ((scm-fnc (cadr expr))
|
||||
|
@ -151,7 +151,7 @@
|
|||
)
|
||||
`(define-c ,scm-fnc ,args ,body)
|
||||
))))
|
||||
; '(c-defun scm-strlen int "strlen" string)
|
||||
; '(c-define scm-strlen int "strlen" string)
|
||||
; list
|
||||
; list))
|
||||
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
)
|
||||
|
||||
;; Must be top-level
|
||||
(c-defun scm-strlen int "strlen" string)
|
||||
(c-defun scm-strlend double "strlen" string)
|
||||
(c-define scm-strlen int "strlen" string)
|
||||
(c-define scm-strlend double "strlen" string)
|
||||
|
||||
(test-group "foreign lambda"
|
||||
(test 15 (scm-strlen "testing 1, 2, 3"))
|
||||
|
|
Loading…
Add table
Reference in a new issue