Hi,

I wanted to know if it was possible to convert back a cstring to a string.

Specifically, I'm binding to sqlite for user functions and when the user 
function returns a string, it provides a cstring as result value and a 
destructor callback called when the string is no longer used by sqlite in order 
to avoid copies. My idea was to call `GC_ref` before and set the destructor 
callback to call `GC_unref` on the string.

However, the callback is given a `void*` pointer which I can easily cast to 
`const char*` pointer, the `cstring` but is it possible to get the `string` 
back to I can call `GC_unref` on it?

Thank you.

Reply via email to