This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Re: call a C-routine as a Scheme function?
- To: hanwen at cs dot uu dot nl
- Subject: Re: call a C-routine as a Scheme function?
- From: Marius Vollmer <mvo at zagadka dot ping dot de>
- Date: 17 Jul 2000 21:28:31 +0200
- Cc: guile at sourceware dot cygnus dot com
- References: <14703.38625.597811.891934@dokkum.cs.uu.nl>
Han-Wen Nienhuys <hanwen@cs.uu.nl> writes:
> right now I first do gh_new_procedure2_0("foo-less", foo_less), and
> call scm_merge_x with gh_eval (gh_symbol2scm ("foo_less")). Surely
> there must be an easier way?
You can use
SCM func = scm_make_gsubr ("foo-less", 2, 0, 0, foo_less);