DETLEF C SDK
Native embedding and package authoring
Loading...
Searching...
No Matches
Package Registration

Macros

#define DETLEF_SDK_TYPE(name)   { DETLEF_SDK_NAMED, name, NULL }
 
#define DETLEF_SDK_ARRAY_TYPE(inner)   { DETLEF_SDK_ARRAY, NULL, inner }
 
#define DETLEF_SDK_OPTIONAL_TYPE(inner)   { DETLEF_SDK_OPTIONAL, NULL, inner }
 
#define DETLEF_SDK_TRY(operation)
 
#define DETLEF_SDK_PACKAGE(definition)   DETLEF_SDK_IMPLEMENT_PACKAGE(definition)
 

Detailed Description

Macro Definition Documentation

◆ DETLEF_SDK_ARRAY_TYPE

#define DETLEF_SDK_ARRAY_TYPE (   inner)    { DETLEF_SDK_ARRAY, NULL, inner }

Initialize an array type specification from a borrowed element specification.

Parameters
innerPointer to a type specification that must outlive its users.

Definition at line 149 of file detlef_sdk.h.

◆ DETLEF_SDK_OPTIONAL_TYPE

#define DETLEF_SDK_OPTIONAL_TYPE (   inner)    { DETLEF_SDK_OPTIONAL, NULL, inner }

Initialize an optional type specification from a borrowed inner specification.

Parameters
innerPointer to a type specification that must outlive its users.

Definition at line 157 of file detlef_sdk.h.

◆ DETLEF_SDK_PACKAGE

#define DETLEF_SDK_PACKAGE (   definition)    DETLEF_SDK_IMPLEMENT_PACKAGE(definition)

Define the package entry points in exactly one translation unit. The argument must name a package definition whose tables and callback data outlive the runtime. The selected adapter registers all records and callables during loading.

Definition at line 592 of file detlef_sdk.h.

◆ DETLEF_SDK_TRY

#define DETLEF_SDK_TRY (   operation)
Value:
do { \
DetlefSdkStatus sdk_status_ = (operation); \
if (sdk_status_ != DETLEF_SDK_OK) \
return sdk_status_; \
} while (0)
DetlefSdkStatus
Definition detlef_sdk.h:48
@ DETLEF_SDK_OK
Definition detlef_sdk.h:53

Evaluate an SDK operation once and return its failing status from the enclosing callback. Wasm host errors can abort the callback before a status is returned.

Parameters
operationOperation returning DetlefSdkStatus.

Definition at line 177 of file detlef_sdk.h.

◆ DETLEF_SDK_TYPE

#define DETLEF_SDK_TYPE (   name)    { DETLEF_SDK_NAMED, name, NULL }

Initialize a borrowed named type specification. The name must remain valid while referenced.

Parameters
nameBorrowed NUL-terminated type name.

Definition at line 141 of file detlef_sdk.h.