if ({{ ok_binding }} == null) {
if (out_result) |ptr| ptr.* = null;
return 0;
}
const _owned_result = std.heap.c_allocator.dupeZ(u8, std.mem.span({{ ok_binding }})) catch {
{% if has_out_error %}
if (out_error) |ptr| ptr.* = null;
{% endif %}
return 1;
};
if (out_result) |ptr| {
ptr.* = @ptrCast(_owned_result.ptr);
} else {
std.heap.c_allocator.free(_owned_result);
}
return 0;