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

Functions

static DetlefSdkStatus detlef_sdk_argument_count (DetlefSdkCall *call, size_t *count)
 
static DetlefSdkStatus detlef_sdk_argument (DetlefSdkCall *call, size_t index, DetlefSdkValue *out)
 

Detailed Description

Function Documentation

◆ detlef_sdk_argument()

static DetlefSdkStatus detlef_sdk_argument ( DetlefSdkCall *  call,
size_t  index,
DetlefSdkValue *  out 
)
inlinestatic

Obtain one argument, evaluating it when called from a control.

Functions receive their already evaluated argument. Controls evaluate the requested expression on each call, so repeated calls may repeat side effects.

Parameters
callBorrowed callback access. Must not be saved or freed.
indexZero-based argument index.
[out]outReceives a callback-local handle, released automatically at callback exit. Must be retained before being saved for a later callback.
Returns
DETLEF_SDK_OK on success. An invalid index or evaluation failure returns a native status or aborts the Wasm callback with an exception.

◆ detlef_sdk_argument_count()

static DetlefSdkStatus detlef_sdk_argument_count ( DetlefSdkCall *  call,
size_t *  count 
)
inlinestatic

Read the number of arguments supplied to the current callable.

Parameters
callBorrowed callback access. Must not be saved or freed.
[out]countReceives the argument count. No cleanup is required.
Returns
DETLEF_SDK_OK on success. A native host failure returns a status; a Wasm host failure aborts the callback with an exception.