Added define-stubless-foreign.
This commit is contained in:
parent
c96cde2294
commit
56d5597025
17
cig/cig.scm
17
cig/cig.scm
|
@ -863,6 +863,10 @@ step 4
|
|||
(let ((name (cdr form)))
|
||||
(set! init-name (car name))))
|
||||
|
||||
((define-stubless-foreign)
|
||||
(let ((c-name (cadddr form)))
|
||||
(set! c-names (cons c-name c-names))))
|
||||
|
||||
((foreign-source)
|
||||
(let ((forms (cdr form)))
|
||||
(if (pair? forms)
|
||||
|
@ -1089,9 +1093,11 @@ step 4
|
|||
|
||||
|
||||
|
||||
(define-structure define-foreign-syntax (export (define-foreign :syntax)
|
||||
(foreign-source :syntax)
|
||||
(foreign-init-name :syntax))
|
||||
(define-structure define-foreign-syntax
|
||||
(export (define-foreign :syntax)
|
||||
(foreign-source :syntax)
|
||||
(foreign-init-name :syntax)
|
||||
(define-stubless-foreign :syntax))
|
||||
(open scheme external-calls structure-refs cig-aux)
|
||||
(access signals) ; for ERROR
|
||||
(for-syntax (open scheme define-foreign-syntax-support))
|
||||
|
@ -1109,6 +1115,11 @@ step 4
|
|||
(syntax-rules ()
|
||||
((foreign-init-name name) (lambda () name))))
|
||||
|
||||
(define-syntax define-stubless-foreign
|
||||
(syntax-rules ()
|
||||
((define-stubless-foreign bla ...)
|
||||
(import-lambda-definition bla ...))))
|
||||
|
||||
(define (check-arg pred obj proc)
|
||||
(if (not (pred obj))
|
||||
(error "check-arg" pred obj proc)
|
||||
|
|
Loading…
Reference in New Issue