Modules

Modules

Functions

Includes

#include <seed/seed.h>

Description

Functions

CHECK_ARG_COUNT()

#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.

Parameters

name

The name of the function being called from, pretty-printed

 

argnum

The number of arguments which should be passed into the function

 

DEFINE_ENUM_MEMBER()

#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.

Parameters

holder

The object on which to define the enum member

 

member

The enum member, as it is named in C

 

DEFINE_ENUM_MEMBER_EXT()

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

Parameters

holder

The object on which to define the enum member

 

name

The enum member, as it should be named in JavaScript

 

val

The enum member, as it is named in C

 

SeedModuleInitCallback ()

SeedObject
(*SeedModuleInitCallback) (SeedEngine *eng);

Types and Values