Rename macro to "c-define" per discussion w/Arthur

This commit is contained in:
Justin Ethier 2020-04-30 11:21:30 -04:00
parent ebeb0e8651
commit ca06ad2b0b
2 changed files with 5 additions and 5 deletions

View file

@ -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))

View file

@ -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"))