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

Functions

static DetlefSdkStatus detlef_sdk_execute (DetlefSdkCall *call, const char *source, size_t length, DetlefSdkValue *out)
 
static DetlefSdkStatus detlef_sdk_error (DetlefSdkCall *call, const char *message)
 
static void * detlef_sdk_data (DetlefSdkCall *call)
 

Detailed Description

Function Documentation

◆ detlef_sdk_data()

static void * detlef_sdk_data ( DetlefSdkCall *  call)
inlinestatic

Read the data pointer supplied in this callable's definition. The SDK never frees this pointer.

Parameters
callBorrowed callback access. Must not be saved or freed.
Returns
Borrowed callable data; must not be freed by the SDK.

◆ detlef_sdk_error()

static DetlefSdkStatus detlef_sdk_error ( DetlefSdkCall *  call,
const char *  message 
)
inlinestatic

Report a package error. Native calls return DETLEF_SDK_ERROR; Wasm calls throw into the host and abort the callback immediately. No portable recovery inside the callback is supported.

Parameters
callBorrowed callback access. Must not be saved or freed.
messageBorrowed NUL-terminated message, copied during reporting.
Returns
DETLEF_SDK_ERROR on native; the Wasm callback does not return.

◆ detlef_sdk_execute()

static DetlefSdkStatus detlef_sdk_execute ( DetlefSdkCall *  call,
const char *  source,
size_t  length,
DetlefSdkValue *  out 
)
inlinestatic

Evaluate source within the current Control context. Unavailable to eager Functions. Side effects are not rolled back on error.

Parameters
callBorrowed callback access. Must not be saved or freed.
sourceBorrowed UTF-8 source.
lengthSource byte length.
[out]outReceives a callback-local handle, released automatically at callback exit. Must be retained before being saved beyond the callback.
Returns
DETLEF_SDK_OK on success; a native failure returns a status and a Wasm host failure aborts the callback with an exception.