From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Christopher Cramer Newsgroups: gmane.lisp.guile.devel Subject: Re: scm_* API question Date: Tue, 30 Jul 2002 20:09:29 -0500 Sender: guile-devel-admin@gnu.org Message-ID: <20020730200929.A18106@kiwi.pyrotechnics.com> References: <20020730121436.GA4465@www> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1028077588 19780 127.0.0.1 (31 Jul 2002 01:06:28 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 31 Jul 2002 01:06:28 +0000 (UTC) Cc: guile-devel@gnu.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17ZhwY-00058v-00 for ; Wed, 31 Jul 2002 03:06:26 +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 17Zhwt-0004XY-00; Tue, 30 Jul 2002 21:06:47 -0400 Original-Received: from pyro.net ([207.7.10.6] helo=kiwi.pyro.net) by fencepost.gnu.org with smtp (Exim 3.35 #1 (Debian)) id 17Zhvs-0004VL-00 for ; Tue, 30 Jul 2002 21:05:44 -0400 Original-Received: (qmail 19462 invoked by uid 8610); 31 Jul 2002 01:09:29 -0000 Original-To: rm@fabula.de Mail-Followup-To: rm@fabula.de, guile-devel@gnu.org Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020730121436.GA4465@www>; from rm@fabula.de on Tue, Jul 30, 2002 at 02:14:36PM +0200 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:895 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:895 On Tue, Jul 30, 2002 at 02:14:36PM +0200, rm@fabula.de wrote: > in my application i have a SCM value that holds > a list of symbols. I need to > > a) find the module that corresponds to this list, > i.e. the scm_* counterpart of guile's resolve-module. > Is: > > SCM my_list, my_module, my_symbol; > > ... > my_module = scm_resolve_module(my_list); > > the right way? Yes. Well, I think it might fail if the module isn't already loaded. > b) access symbols from the module. Is: > > my_symbol = scm_module_lookup(my_module, a_symbol); > > ok? Yes. > c) use the module i found in step a. Hmm, the only thing i > found so far is 'scm_c_use_module(char *)', but that takes > a string (even without the enclosing brackets!) so i can't > really use this (or do i have to build the string myself > from my SCM list? Kind of silly, considering the fact that the > list was built from a string using scm_c_read_string(char *). Well, scm_c_use_module just calls process-use-modules, so you could do that directly. > 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. -- Christopher Cramer On résiste à l'invasion des armées; on ne résiste pas à l'invasion des idées. -- Victor Hugo _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel