Copy the content of src into a C-string ('\0' terminated) then call dg
The intent of this function is to provide an allocation-less
way to call a C function using a D slice.
The function internally allocates a buffer if needed, but frees it on exit.
Note:
The argument to dg is scope. To keep the data around after dg exits,
one has to copy it.
Copy the content of src into a C-string ('\0' terminated) then call dg
The intent of this function is to provide an allocation-less way to call a C function using a D slice. The function internally allocates a buffer if needed, but frees it on exit.
Note: The argument to dg is scope. To keep the data around after dg exits, one has to copy it.