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: More on module API Date: Mon, 12 Aug 2002 21:29:38 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <20020812192938.GA2749@www> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1029179835 31902 127.0.0.1 (12 Aug 2002 19:17:15 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 12 Aug 2002 19:17:15 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17eKgj-0008IR-00 for ; Mon, 12 Aug 2002 21:17:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17eKha-0006an-00; Mon, 12 Aug 2002 15:18:06 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17eKgw-0006TV-00 for guile-devel@gnu.org; Mon, 12 Aug 2002 15:17:26 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17eKgu-0006TJ-00 for guile-devel@gnu.org; Mon, 12 Aug 2002 15:17:25 -0400 Original-Received: from www.elogos.de ([212.18.192.92]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17eKgt-0006Sr-00 for guile-devel@gnu.org; Mon, 12 Aug 2002 15:17:23 -0400 Original-Received: by www.elogos.de (Postfix, from userid 5001) id 5CAF810482D; Mon, 12 Aug 2002 21:29:38 +0200 (CEST) Original-To: guile-devel@gnu.org Content-Disposition: inline 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:1066 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1066 Hello, first of all a big "thank you" to Mathias and Marius -- i now got my module stuff working. Working on mod_guile some more questions and suggestions emerged: - currently snarfing doesn't really work for my use of the module C API. While it does generate a call to 'scm_c_define_gsubr' it doesn't generate one for 'scm_c_export'. I guess the rationale behind this was the concept that methods are added to the modules public interface by means of scheme code. Since sometimes (like in my case) this isn't wanted i want to suggest adding a new snarfer macro 'SCM_DEFINE_PUBLIC' to libguile/snarf.h: /* FIXME: The following is _allmost_ literal from libguile/snarf.h: * This should be provided by guile itself. */ #define SCM_DEFINE_PUBLIC(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \ SCM_SNARF_HERE(\ static const char s_ ## FNAME [] = PRIMNAME; \ static SCM FNAME ARGLIST\ )\ SCM_SNARF_INIT(\ scm_c_define_gsubr (s_ ## FNAME, REQ, OPT, VAR, \ (SCM_FUNC_CAST_ARBITRARY_ARGS) FNAME); \ scm_c_export(s_ ## FNAME , NULL); \ )\ SCM_SNARF_DOCS(primitive, FNAME, PRIMNAME, ARGLIST, REQ, OPT, VAR, DOCSTRING) - looking at the code emited by the current snarfer i realized that the function isn't declared 'static' (NOTE: my version of SCM_DEFINE_PUBLIC declares the function to be static). Is this intentional? I can't think of a reason to export the function on the C level. Ralf Mattes _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel