guile-user
[Top][All Lists]
Advanced

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

Re: Namespaces for HB-Guile modules? Help. :(


From: Neil Jerram
Subject: Re: Namespaces for HB-Guile modules? Help. :(
Date: 23 Nov 2001 11:19:11 +0000
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Alejandro" == Alejandro Forero Cuervo <address@hidden> writes:

    Alejandro> Thank you very much for your information on safe
    Alejandro> modules, they seem to be precisely what I was needing.

    Alejandro> I still have a few questions.

    Alejandro> How am I supposed to load module (ice-9 safe) from C
    Alejandro> code?  I tried with scm_c_use_module("ice-9 safe"); but
    Alejandro> I got ERROR: In procedure car: ERROR: Wrong type
    Alejandro> argument in position 1: ice-9 .  I tried with different
    Alejandro> strings (such as "safe" and "(ice-9 safe)") but I could
    Alejandro> not figure out how to specify the module name to
    Alejandro> scm_c_use_module.

This looks correct to me, although the space in the error message
between `ice-9' and `.' is odd.  It might be useful to get a backtrace
and include that in your report.

Also, what version are you on?

    Alejandro> I also tried with
    Alejandro> scm_call_1(scm_c_lookup("use-modules"),
    Alejandro> scm_list_2(scm_mem2symbol("ice-9", 5),
    Alejandro> scm_mem2symbol("safe", 4))); but I got ERROR: In
    Alejandro> procedure apply: ERROR: Wrong type argument in position
    Alejandro> 1: #<variable 40274f40 binding: #<macro! use-modules>>
    Alejandro> .

The first problem here is that scm_c_lookup returns a variable object,
and you want the variable's value - use SCM_VARIABLE_REF.  Also,
though, use-modules is a macro, and I don't know whether it works to
use scm_call_N to call a macro.

        Neil




reply via email to

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