diff options
author | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 2000-01-07 00:29:28 +0000 |
---|---|---|
committer | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 2000-01-07 00:29:28 +0000 |
commit | bfe19b466fbad8a434d68078cecc36dad9b53679 (patch) | |
tree | 2a631c47612b13c3269afd49b8c3645c8ed22941 | |
parent | 636480e686da72348c07edbacc13fe58cff2d469 (diff) | |
download | guile-bfe19b466fbad8a434d68078cecc36dad9b53679.tar.gz |
* snarf.h (SCM_INSITU, SCM_INIT): New snarf macros for use in user
snarf macro definitions.
-rw-r--r-- | libguile/snarf.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/libguile/snarf.h b/libguile/snarf.h index 6bbaa49d9..87bb9f45e 100644 --- a/libguile/snarf.h +++ b/libguile/snarf.h @@ -5,7 +5,7 @@ #ifndef LIBGUILE_SNARF_H #define LIBGUILE_SNARF_H -/* Copyright (C) 1995,1996,1997,1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1995-2000 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -51,6 +51,24 @@ +/* Generic macros to be used in user macro definitions. + * + * For example, the SCM_PROC macro could have been defined by the user: + * + * #define SCM_PROC(RANAME, STR, REQ, OPT, VAR, CFN) \ + * SCM_INSITU (static const char RANAME[]=STR) \ + * SCM_INIT (scm_make_gsubr (RANAME, REQ, OPT, VAR, (SCM (*)(...)) CFN)) + */ + +#ifndef SCM_MAGIC_SNARFER +# define SCM_INSITU(X) X +# define SCM_INIT(X) +#else +# define SCM_INSITU(X) +# define SCM_INIT(X) \ +%%% X +#endif + #ifndef SCM_MAGIC_SNARFER #define SCM_DEFINE(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \ |