From 777667574c2a5a362a71478380d2ae143ac95f6e Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 17 Jun 2004 12:17:48 +0000 Subject: [PATCH] . original commit: 3ef00f1e4cbde484a4341c74b2c75df2a61c5ec4 --- collects/mzlib/foreign.ss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/collects/mzlib/foreign.ss b/collects/mzlib/foreign.ss index 21548bf..3daf4be 100644 --- a/collects/mzlib/foreign.ss +++ b/collects/mzlib/foreign.ss @@ -86,13 +86,15 @@ type new)) ;; Combining the above two in a `define-c' special form which makes a Scheme -;; `binding': +;; `binding', first a `parameter'-like constructor: (provide make-c-parameter) (define (make-c-parameter name lib type) (let ([obj (ffi-obj (get-ffi-obj-name 'make-c-parameter name) (get-ffi-lib lib))]) (case-lambda [() (ffi-get obj type)] [(new) (ffi-set! obj type new)]))) +;; Then the fake binding syntax, uses the defined identifier to name the +;; object: (provide define-c) (define-syntax (define-c stx) (syntax-case stx ()