From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: rm@fabula.de Newsgroups: gmane.lisp.guile.devel Subject: scm_* API extension? [was] scm_* API question Date: Wed, 31 Jul 2002 12:03:00 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <20020731100300.GC5661@www> References: <20020730121436.GA4465@www> <20020730200929.A18106@kiwi.pyrotechnics.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1028109100 13707 127.0.0.1 (31 Jul 2002 09:51:40 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 31 Jul 2002 09:51:40 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17Zq8o-0003Yy-00 for ; Wed, 31 Jul 2002 11:51:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17Zq9G-0002jl-00; Wed, 31 Jul 2002 05:52:06 -0400 Original-Received: from www.elogos.de ([212.18.192.92]) by fencepost.gnu.org with smtp (Exim 3.35 #1 (Debian)) id 17Zq90-0002jF-00 for ; Wed, 31 Jul 2002 05:51:50 -0400 Original-Received: by www.elogos.de (Postfix, from userid 5001) id 57D961049A2; Wed, 31 Jul 2002 12:03:00 +0200 (CEST) Original-To: rm@fabula.de, guile-devel@gnu.org Content-Disposition: inline In-Reply-To: <20020730200929.A18106@kiwi.pyrotechnics.com> User-Agent: Mutt/1.3.24i Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:896 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:896 On Tue, Jul 30, 2002 at 08:09:29PM -0500, Christopher Cramer wrote: > > ... > > my_module = scm_resolve_module(my_list); > > > > the right way? > > Yes. Well, I think it might fail if the module isn't already loaded. It _seems_ to work and load the requested module. > > Well, scm_c_use_module just calls process-use-modules, so you could > do that directly. hmm, 'process-use-modules' is an the _scheme_ level, i'm loking at the C level -- there seems to be no scm_* level function for this. Libguile uses a call to the function pointed by 'process_use_modules_var', but that variable is declared static in modules.c. So, if i understand right i have to duplicate the code from modules.c (i.e. lookup the 'process-use-modules' function and apply it to my list of symbols). Would it be usefull to provide a scm_* function for it? /* file: modules.c */ /* @code{scm_use_module}(@val{list}) @code{scm_use_module} imports bindings exported from the module defined by the list of symbols given as the parameter @var{list}. This function is the equivalent of the guile level call @code{(use-modules list)}. */ void scm_use_module(SCM list) { scm_call_1(SCM_VARIABLE_REF(process_use_module_var), list); } > > Oh, btw, whad _does_ scm_c_read_string return if string isn't > > a valid S-expression? > > It shouldn't return, but throw an exception with the misc-error key > and a helpful message. > Ok, thank's a lot for this information. Ralf Mattes _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel