Top | ![]() |
![]() |
![]() |
![]() |
#define | CHECK_ARG_COUNT() |
#define | DEFINE_ENUM_MEMBER() |
#define | DEFINE_ENUM_MEMBER_EXT() |
SeedObject | (*SeedModuleInitCallback) () |
#define CHECK_ARG_COUNT(name, argnum)
Check that the required number of arguments were passed into a
SeedFunctionCallback. If this is not true, raise an exception and
return NULL
. This requires the callback to use "argument_count",
"ctx", and "exception" as the names of the various function arguments.
name
should be of form "namespace.function_name"
At the moment, there is no way to specify more than one acceptable argument count.
#define DEFINE_ENUM_MEMBER(holder, member)
Defines a property on holder
which is named the same as member
, and
is assigned the value that member
has in C.
This macro works for defining properties from constants and #defines as well.
#define DEFINE_ENUM_MEMBER_EXT(holder, name, val)
Defines a property on holder
which is named name
, and is assigned the
value that member
has in C. This allows for an override of the enum
member's name, most often to remove a common prefix. For example, to declare
a property named VERSION_MAJOR on the namespace from mfpr's version
constant MPFR_VERSION_MAJOR:
DEFINE_ENUM_MEMBER_EXT(ns, "VERSION_MAJOR", MPFR_VERSION_MAJOR);