Node:Writing your own snarfing macros, Previous:Macros guile-snarf recognizes, Up:Init Snarfing with guile-snarf
When you want to use the general snarfing machanism, but none of the
provided macros fits your need, you can use the macro
SCM_SNARF_INIT
.
For example, the SCM_SYMBOL
macro can be defined like this:
#define SCM_SYMBOL(c_name, scheme_name) \ static SCM c_name \ SCM_SNARF_INIT(c_name = scm_permanent_object (scm_str2symbol (scheme_name)))
SCM_SNARF_INIT (code) | Macro |
When processed normally, SCM_SNARF_INIT expands to nothing;
when processed by the snarfer, it causes code to be included in
the initialization action file, followed by a semicolon.
|