Next: , Previous: Wrapping a C Function, Up: G-Wrap's High-level API


Wrapping a C Constant

— method: wrap-constant! (wrapset <gw-wrapset>) . args

Add the C constant (either a macro or an enumerate value) defined by args to the list of constants to be wrapped by wrapset. The arguments in args must contain the following named parameters:

#:name
a symbol that is name given to the C constant in the target language binding;
#:type
a symbol denoting the type of this constant, more precisely the name of the wrapped-type for the constant's type;
#:value
a string representing the constant in C (e.g. "ENOMEM");
#:description
a string describing this constant.