|
DETLEF C SDK
Native embedding and package authoring
|
|
inlinestatic |
Borrow a NUL-terminated string, excluding its terminator. NULL means an empty slice. Use detlef_slice() for text containing embedded NUL bytes.
| text | Borrowed NUL-terminated UTF-8 text. |
Definition at line 33 of file detlef_helpers.h.
|
inlinestatic |
Execute NUL-terminated source; return the ABI status and an owned result.
| access | Borrowed live callback access. Must not be saved or freed. | |
| source | Borrowed NUL-terminated UTF-8 source. | |
| [out] | result | Receives an owned handle on success. Must be released with the matching handle-release operation unless transferred as a callback result. |
Definition at line 73 of file detlef_helpers.h.
|
inlinestatic |
Create an owned string value through limited Function access.
| access | Borrowed live callback access. Must not be saved or freed. | |
| text | Borrowed NUL-terminated UTF-8 text. | |
| [out] | result | Receives an owned handle on success. Must be released with the matching handle-release operation unless transferred as a callback result. |
Definition at line 104 of file detlef_helpers.h.
|
inlinestatic |
name is borrowed, handle is copied without retaining it. The consuming ABI call determines whether handle must be a type, TypeRef, or value.
| name | Borrowed UTF-8 name slice, copied without retaining its storage. |
| handle | Borrowed handle. Copying it does not retain or consume it. |
Definition at line 46 of file detlef_helpers.h.
|
inlinestatic |
Borrow a NUL-terminated name and pair it with an unretained handle ID.
| name | Borrowed NUL-terminated name. |
| handle | Borrowed handle. Copying it does not retain or consume it. |
Definition at line 59 of file detlef_helpers.h.
|
inlinestatic |
Add a Control to a package; callback code and data remain host-owned.
| access | Borrowed live callback access. Must not be saved or freed. |
| package | Borrowed package-builder handle. Not consumed. |
| name | Borrowed NUL-terminated name. |
| callback | Synchronous implementation. Its code and data must outlive registrations. |
| data | Caller-owned callback data, valid while the registration can run. |
Definition at line 188 of file detlef_helpers.h.
|
inlinestatic |
Package parameters use TypeRef handles rather than resolved types.
| access | Borrowed live callback access. Must not be saved or freed. |
| package | Borrowed package-builder handle. Not consumed. |
| name | Borrowed NUL-terminated name. |
| parameters | Borrowed parameter names paired with unresolved TypeRef handles. Handles are not consumed. |
| count | Number of parameters. |
| variadic | Optional borrowed variadic parameter; NULL means none. |
| callback | Synchronous implementation. Its code and data must outlive registrations. |
| data | Caller-owned callback data, valid while the registration can run. |
Definition at line 167 of file detlef_helpers.h.
|
inlinestatic |
Register a Control; callback code and data must outlive the registration.
| access | Borrowed live callback access. Must not be saved or freed. |
| name | Borrowed NUL-terminated name. |
| callback | Synchronous implementation. Its code and data must outlive registrations. |
| data | Caller-owned callback data, valid while the registration can run. |
Definition at line 143 of file detlef_helpers.h.
|
inlinestatic |
Parameters use resolved type handles. Callback code and data must outlive their registrations. Function access remains distinct from Control access.
| access | Borrowed live callback access. Must not be saved or freed. |
| name | Borrowed NUL-terminated name. |
| parameters | Borrowed parameter names paired with resolved type descriptors. Handles are not consumed. |
| count | Number of parameters. |
| variadic | Optional borrowed variadic parameter; NULL means none. |
| callback | Synchronous implementation. Its code and data must outlive registrations. |
| data | Caller-owned callback data, valid while the registration can run. |
Definition at line 125 of file detlef_helpers.h.
|
inlinestatic |
Borrow exactly len bytes, including any embedded NUL bytes. The caller must keep data valid for the consuming call. UTF-8 validation happens in DETLEF.
| data | Borrowed byte storage, valid for len bytes. |
| len | Number of supplied bytes. |
Definition at line 20 of file detlef_helpers.h.
|
inlinestatic |
Create an owned string value from NUL-terminated text.
| access | Borrowed live callback access. Must not be saved or freed. | |
| text | Borrowed NUL-terminated UTF-8 text. | |
| [out] | result | Receives an owned handle on success. Must be released with the matching handle-release operation unless transferred as a callback result. |
Definition at line 89 of file detlef_helpers.h.