From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Dale P. Smith" Newsgroups: gmane.lisp.guile.devel Subject: Re: What replaces scm_register_module_xxx (Doc update?) Date: Thu, 8 Aug 2002 13:59:30 -0400 Organization: Altus Technologies Corporation Sender: guile-devel-admin@gnu.org Message-ID: <20020808135930.137432c9.dsmith@altustech.com> References: <20020808134824.GB23831@www> <20020808102103.021cdc0c.dsmith@altustech.com> <874re5mnfs.fsf@raven.i.defaultvalue.org> <20020808161958.GA24162@www> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1028829681 15629 127.0.0.1 (8 Aug 2002 18:01:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 8 Aug 2002 18:01:21 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17crb6-00043y-00 for ; Thu, 08 Aug 2002 20:01:20 +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 17crbn-0008IG-00; Thu, 08 Aug 2002 14:02:03 -0400 Original-Received: from 208-40-56-34.corecomm.net ([208.40.56.34] helo=borg.altus.cc) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17crbF-0008Ey-00 for ; Thu, 08 Aug 2002 14:01:29 -0400 Original-Received: from sparky (firewall-user@[12.15.7.94]) by borg-eth1.altus.cc (8.10.2/8.10.2) with SMTP id g78I1RJ27171 for ; Thu, 8 Aug 2002 14:01:27 -0400 Original-To: guile-devel@gnu.org In-Reply-To: <20020808161958.GA24162@www> X-Mailer: Sylpheed version 0.7.5claws25 (GTK+ 1.2.10; i386-debian-linux-gnu) 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:1018 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1018 On Thu, 8 Aug 2002 18:19:58 +0200 rm@fabula.de wrote: > I think there's a misunderstanding/misconception here (or, better: > in guile's current C api). The 'load-c-functions-through-scheme' > aproach might be fine and all that's needed as long as we only want > to extend _guile_ (the application) with external libs. But guile > is inteded to be an embedded srcipting language as well (at least that's > what the documentation says). If i want my users to be able to script > some of my applications functionality there's no library i can load > with 'load-extension' -- of course i could put the tiny scm_* wrapper > functions into a dll and have _that_ loaded, but i wouldn't call this > good design practise (oh, i could 'load-extension' my own application > instead, but that's not really portable ...). Having to provide (and > deploy!) scm file(s) just to be able to put my functions into different > modules feels clumsy. I think it's possible with the (undocumented) scm_c_* functions in libguile/modules.c. It looks like this is the first stab at providing a C interface to the module system. A problem that I see is that there is no way to tell the snarfing system which module to put things in. It's not that big of a problem if you split up different "modules" into different C files. In the init routine for the file, you first call scm_c_define_module, then #include the .x file, then call scm_c_exports with the names of the symbols you need to export. You might want to verify the scm_c_* fucniton names I used. -Dale -- Dale P. Smith Senior Systems Consultant, | Treasurer, Altus Technologies Corporation | Cleveland Linux Users Group dsmith@altustech.com | http://cleveland.lug.net 440-746-9000 x339 | _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel