From ca06ad2b0bd6b495f6d71aa7853b5a7f6248d190 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 30 Apr 2020 11:21:30 -0400 Subject: [PATCH] Rename macro to "c-define" per discussion w/Arthur --- libs/cyclone/foreign.sld | 6 +++--- libs/test-foreign.scm | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/cyclone/foreign.sld b/libs/cyclone/foreign.sld index 470212b5..7d82e001 100644 --- a/libs/cyclone/foreign.sld +++ b/libs/cyclone/foreign.sld @@ -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)) diff --git a/libs/test-foreign.scm b/libs/test-foreign.scm index 9889aae8..3635011f 100644 --- a/libs/test-foreign.scm +++ b/libs/test-foreign.scm @@ -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"))