mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
Provide SCM_DEFINE_STATIC
From guile-gnome:plain/glib/gnome/gobject/private.h. * libguile/gsubr.h (SCM_DEFINE_STATIC): As stated.
This commit is contained in:
parent
2041cd88fc
commit
6b0491233f
1 changed files with 11 additions and 1 deletions
|
@ -93,7 +93,6 @@ SCM_SNARF_DOCS(primitive, FNAME, PRIMNAME, ARGLIST, REQ, OPT, VAR, DOCSTRING)
|
|||
/* Always use the generic subr case. */
|
||||
#define SCM_DEFINE SCM_DEFINE_GSUBR
|
||||
|
||||
|
||||
#define SCM_PRIMITIVE_GENERIC(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \
|
||||
SCM_SNARF_HERE(\
|
||||
SCM_UNUSED static const char s_ ## FNAME [] = PRIMNAME; \
|
||||
|
@ -120,6 +119,17 @@ scm_c_export (s_ ## FNAME, NULL); \
|
|||
)\
|
||||
SCM_SNARF_DOCS(primitive, FNAME, PRIMNAME, ARGLIST, REQ, OPT, VAR, DOCSTRING)
|
||||
|
||||
#define SCM_DEFINE_STATIC(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_SNARF_DOCS(primitive, FNAME, PRIMNAME, ARGLIST, REQ, OPT, VAR, DOCSTRING)
|
||||
|
||||
#define SCM_PROC(RANAME, STR, REQ, OPT, VAR, CFN) \
|
||||
SCM_SNARF_HERE(SCM_UNUSED static const char RANAME[]=STR) \
|
||||
SCM_SNARF_INIT(scm_c_define_gsubr (RANAME, REQ, OPT, VAR, \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue