1 /* $Id: xsnarf.h,v 1.3 2005/10/21 03:06:42 sgt Exp $
4 * an init-function and document snarfing system for guile, but indepenendent
6 * This implementation is most like the one from guile-1.4, but will also
7 * work in guile-1.5/1.6
19 /*#define SCM__INIT_HOOK(var, name, nargs) do { var = scm_permanent_object(scm_c_define(name, scm_make_hook(SCM_MAKINUM(nargs)))); } while (0)
21 #define SCM__INIT_HOOK(var, name, nargs) do { var = scm_create_hook(name, nargs);} while(0)
24 #ifndef SCM_FUNC_CAST_ARBITRARY_ARGS
25 #define SCM_FUNC_CAST_ARBITRARY_ARGS SCM (*)()
29 #define XSCM_HOOK(var, name, nargs, arglist, docstring) \
30 SCM_SNARF_HERE(static SCM var)\
31 SCM_SNARF_DOCS(hook, name, name, arglist, nargs, 0, 0, docstring) \
32 SCM_SNARF_INIT( SCM__INIT_HOOK(var, name, nargs) )
34 #define XSCM_GLOBAL_HOOK(var, name, nargs, arglist, docstring) \
35 SCM_SNARF_HERE(SCM var)\
36 SCM_SNARF_DOCS(hook, name, name, arglist, nargs, 0, 0, docstring) \
37 SCM_SNARF_INIT( SCM__INIT_HOOK(var, name, nargs) )
39 #define XSCM_CONCEPT(name, docstring)\
40 SCM_SNARF_DOCS(concept, name, name, 0, 0, 0, 0, docstring)
44 #endif /* GUILE_EXT_H__ */