unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: rm@fabula.de
Subject: More on module API
Date: Mon, 12 Aug 2002 21:29:38 +0200	[thread overview]
Message-ID: <20020812192938.GA2749@www> (raw)


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


             reply	other threads:[~2002-08-12 19:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-12 19:29 rm [this message]
2002-08-16 20:56 ` More on module API Dale P. Smith
2002-08-31 13:49 ` Marius Vollmer
2002-08-31 18:32   ` Dale P. Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020812192938.GA2749@www \
    --to=rm@fabula.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).