1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 13:30:26 +02:00

Fix snarfing of `SCM_DEFINE' with static allocation.

* libguile/snarf.h (SCM_DEFINE)[SCM_SUPPORT_STATIC_ALLOCATION]: Provide
  a declaration for FNAME since the last argument to
  `SCM_IMMUTABLE_SUBR ()' refers to it.
This commit is contained in:
Ludovic Courtès 2009-11-05 23:06:45 +01:00
parent 440ae51035
commit f476797998

View file

@ -101,14 +101,15 @@ SCM_SNARF_DOCS(primitive, FNAME, PRIMNAME, ARGLIST, REQ, OPT, VAR, DOCSTRING)
/* Static subr allocation. */ /* Static subr allocation. */
#define SCM_DEFINE(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \ #define SCM_DEFINE(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \
SCM_SYMBOL (scm_i_paste (FNAME, __name), PRIMNAME); \ SCM_SYMBOL (scm_i_paste (FNAME, __name), PRIMNAME); \
SCM_SNARF_HERE( \ SCM_SNARF_HERE( \
static const char scm_i_paste (s_, FNAME) [] = PRIMNAME; \ static const char scm_i_paste (s_, FNAME) [] = PRIMNAME; \
SCM_API SCM FNAME ARGLIST; \
SCM_IMMUTABLE_SUBR (scm_i_paste (FNAME, __subr), \ SCM_IMMUTABLE_SUBR (scm_i_paste (FNAME, __subr), \
scm_i_paste (FNAME, __name), \ scm_i_paste (FNAME, __name), \
REQ, OPT, VAR, &FNAME); \ REQ, OPT, VAR, &FNAME); \
SCM FNAME ARGLIST \ SCM FNAME ARGLIST \
) \ ) \
SCM_SNARF_INIT( \ SCM_SNARF_INIT( \
/* Initialize the procedure name (an interned symbol). */ \ /* Initialize the procedure name (an interned symbol). */ \
scm_i_paste (FNAME, __subr_meta_info)[0] = scm_i_paste (FNAME, __name); \ scm_i_paste (FNAME, __subr_meta_info)[0] = scm_i_paste (FNAME, __name); \
\ \