Hi,
Volkan YAZICI <[EMAIL PROTECTED]> writes:
> Within scm_eval(), I need to use a very simple module:
>
> (define-module ultra-complex-thingy #:pure)
>
> (Yeah, that's the complete source code of my module.) The problem is,
> how can I create and use that module within my C code, in scm_eval()?
> Any assistance will be really appreciated.
You could write a piece of Scheme to create the relevant module.
Namely, you could start with something like this:
(let ((m (make-module)))
(module-use-interfaces! m
(module-public-interface the-root-module)))
And then bind that to some variable accessible from C (or pass it to a
Scheme procedure written in C that will just store it in a C variable
that you can later access).
Most of the module system is written in Scheme, which is why using it
from C is not always convenient. Also, large parts are undocumented but
one should try as much as possible to avoid using them in order to be
"future-proof".
Thanks,
Ludovic.
_______________________________________________
Guile-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/guile-user