unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* More on module API
@ 2002-08-12 19:29 rm
  2002-08-16 20:56 ` Dale P. Smith
  2002-08-31 13:49 ` Marius Vollmer
  0 siblings, 2 replies; 4+ messages in thread
From: rm @ 2002-08-12 19:29 UTC (permalink / 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-08-31 18:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-12 19:29 More on module API rm
2002-08-16 20:56 ` Dale P. Smith
2002-08-31 13:49 ` Marius Vollmer
2002-08-31 18:32   ` Dale P. Smith

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).