Hallo,

On 7/8/07, Martin DeMello <[EMAIL PROTECTED]> wrote:

No, I don't want to pass str into the foreign function, i want str to
*be* the foreign function. That is, I want to use a variable rather
than an explicit string, or a macro that generates and inserts a
string into the right place.


    So you want foreign-lambda, and not foreign-lambda*.

(define-macro make-foreign
  (lambda (name)
    `(define ,name (foreign-lambda int ,(symbol->string name) int))))

Usage:

(map make-foreign '(func1 func2 func3))

Cheers,
--
-alex
http://www.ventonegro.org/


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to