[Top][All Lists]

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

Module/Namespace problems at scm_init_*_module time.

From: Rob Browning
Subject: Module/Namespace problems at scm_init_*_module time.
Date: 01 Dec 2000 17:10:14 -0600
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7

I'm in the process of reworking a lot of g-wrap, and I'm adding
fancier support for shared libraries, but I'm kind of stumped at the
moment on what I suspect is a namespace issue.

Basically, I need to be able to invoke some scheme code from within a
scm_init_*_module file, but as far as gh_eval_str is concerned,
nothing is defined (i.e. not current-module, quote, newline,
nothing...).  However, gh_lookup can find some things.

So my first question is, is there something I need to do in the
scm*init function to get to the point of having a normal scheme side

My second question is related, but more specific to my current

Presume I've got a module named (g-wrap runtime) that's implemented in
g-wrap/runtime.scm, and it's defined as follows:

  (define-module (g-wrap runtime))
  (define (some-scm-func-scm_init_runtime_wrappers_module-needs ...) ...)
  (use-modules (g-wrap runtime-wrappers))

so (g-wrap runtime-wrappers) won't load until after the scm side
function it needs has been defined.

If I want for runtime-wrappers to be able to see the scm func that it
needs (the one defined above), then I need to "use" (g-wrap runtime)
from g-wrap/ somehow, but so far I haven't had
any luck.

I tried to put a

  gh_eval_str("(use-modules (g-wrap runtime))");

in _init, but that failed claiming that use-modules isn't defined.

and I tried using 


directly, but that fails too, though it does appear to successfully
call process-use-modules.

So is there a way to get this to work, or am I going to have to
rethink my approach?


Rob Browning <address@hidden> PGP=E80E0D04F521A094 532B97F5D64E3930

reply via email to

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