www.delorie.com/gnu/docs/guile/guile_51.html   search  
 
Buy GNU books!


Guile Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

13.1.1.3 Writing your own snarfing macros

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)))

Macro: SCM_SNARF_INIT (code)
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.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003