Yes indeed, as always mapping Nim "" to cstring nil may be very wrong.

As there seems to be no pragma or something similar to force "" to nil mapping, 
I am doing it this way now: For all string proc parameters which are attributed 
with "can be NULL" by gobject introspection data base, the default value for 
high level API is "". And only when this attribute is set, then "" is mapped to 
NULL for lib call. This seems to work -- for the rare cases when user wants to 
really pass an empty string for parameters that allow NULL, he has to pass 
"\x0". 

Reply via email to