macro_rules! scalar_init_callback {
($name:ident, |$info:ident| $body:block) => { ... };
}Expand description
Generates a panic-safe unsafe extern "C" scalar function init callback
(duckdb-1-5).
Emits unsafe extern "C" fn $name(info: RawScalarInitInfo), for
ScalarFunctionBuilder::init.
A panic is reported through duckdb_scalar_function_init_set_error. The
argument type keeps the callback out of a table function’s init, and
table_init_callback!’s output out of this
one.
§Example
quack_rs::scalar_init_callback!(my_init, |info| {
let _ = info;
});