When marshaling a pointer type, be it as a reference type or an opaque pointer, we need to create boilerplate for checking for null pointer.
Basically, every pointer exposed to FluenC from C, shall expand to this pseudo code:
if (pointer)
{
return mapToStructTypeAsPerUsual(...);
}
return nothing;
This will force the user of the C API to handle the case where the pointer might be null.
When marshaling a pointer type, be it as a reference type or an opaque pointer, we need to create boilerplate for checking for null pointer.
Basically, every pointer exposed to FluenC from C, shall expand to this pseudo code:
This will force the user of the C API to handle the case where the pointer might be null.