guile-devel
[Top][All Lists]
Advanced

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

Re: Modules: first steps.


From: Han-Wen Nienhuys
Subject: Re: Modules: first steps.
Date: Thu, 19 Sep 2002 02:18:18 +0200

address@hidden writes:
> >  * It would be nice if the C smob example also touched on module use.
> 
> There is "examples/box-module".  Is that what you are looking for, or
> something else?

It would be nice if this was referred to in the documentation. I
accidentally stumbled upon it yesterday.

> >  * I have in my code:

> The reason that you version didn't work is that when
> scm_c_resolve_module (and 'resolve-module') can't find the requested
> module, it returns a fresh, empty one.  It is _totally_ empty, which
> means that things like 'use-modules' aren't available.  Since you want
> to define a new module, you should use scm_c_define_module.  It will
> do all the right things.

OK. The difference wasn't clear to me at all, and I don't think the
distinction is there in the doco.

This means that if I do

            SCM mod = scm_c_define_module (...)
            scm_set_current_module (mod)
            scm_c_define ("foo", ... );

then 'foo is defined in MOD? This is what I really need.
 



-- 

Han-Wen Nienhuys   |   address@hidden   |   http://www.cs.uu.nl/~hanwen 




reply via email to

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