guile-user
[Top][All Lists]
Advanced

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

Re: the module system ?


From: Ian Grant
Subject: Re: the module system ?
Date: Wed, 07 Mar 2001 10:01:53 +0000

> > as you see, it works perfectly fine, so why does it not work from a
> > guile listener?
> 
> Scripts run in a different module (guile) from the module for
> interactive use (guile-user).  The reason is that the environment for
> interactive use is augmented with bindings for debugging, procedure
> documentation etc.  We don't want to load all of that for scripts,
> because we want startup time to be as small as possible.
> 
> But this *should* not make any difference in your case.
> 
> It just looks terribly weird.  I can't think of any reason for the
> difference.  It's probably not a Guile bug, though.

It's probably a guile-pg bug.  The module is defined like this:

(if (not (defined? 'pg-guile-pg-loaded)) ;; Unless already loaded (static) ...
  (dynamic-call "init_postgres" (dynamic-link "libpostgres.so")))

(define-module (database postgres))

(define-public (pg-guile-pg-module-config-stamp) "@GUILE_PG_STAMP@")
(define-public (pg-guile-pg-module-version) "@VERSION@")
(define-public (pg-guile-pg-module-rcsid)
               "$Id: postgres.scm.in,v 1.3 2000/05/31 11:59:07 iang Exp $")

The idea being that I avoid having to explicitly list all the C module exports 
by running the C module init function in the current module.  It's not 
entirely clear to me why this fails in David's case though.

Ian

-- 
Ian Grant, Computer Lab., New Museums Site, Pembroke Street, Cambridge
Phone: +44 1223 334420          Personal e-mail: iang at pobox dot com 





reply via email to

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