guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: modules and C,C++


From: David Fang
Subject: Re: modules and C,C++
Date: Thu, 22 Mar 2007 19:19:57 -0500 (EST)

>  ....
> > What do I need to do to export my scm_c_define_gsubr'd
> > functions to the module?  Must I wrap them into another module in C, and
> > use-module it?  (Would I expect the same problem with mixing
> > load-extensions with modules?)
>
> You will want to read about scm_c_export() and scm_c_call_with_current_module 
> in 
> http://www.gnu.org/software/guile/manual/html_node/Dynamic-Linking-and-Compiled-Code-Modules.html
> and 
> http://www.gnu.org/software/guile/manual/html_node/Accessing-Modules-from-C.html

Thanks for the pointer.  What I ended up doing was wrapping the
scm_c_define_gsubr initialization routine (along with scm_c_export's)
inside a scm_c_define_module("foo bar-primitives", ...) to distinguish the
primitives from the non-primitives in a pure scheme module that calls the
primitives.  This way I don't end up throwing things into the default
(guile-user) top module.  Works quite well.

Fang





reply via email to

[Prev in Thread] Current Thread [Next in Thread]