> C.GoString will handle NULL C strings properly, by passing back "".
> But C.CString will take an empty Go string and actually generate a
> '\0'-terminated empty string.  This confuses libxl, which is expecting
> non-values to be NULL, not "".
>
> Only call C.CString if the Go string is non-empty.

Good catch, thanks. This should go in v5 of my series though, right?
The toC code hasn't been checked-in yet.

-NR

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to