[CM] s7_string v. s7_object_to_c_string

Gregg Reynolds dev at mobileink.com
Tue Jul 20 18:21:16 PDT 2021


If I s7_make_string(sc, filename), then convert the s7_pointer back to a C
string, the two functions s7_string and s7_object_to_c_string should
produce identical output, no? Namely a string identical to the original
source. That's what I would expect, anyway.

I just found something fishy about s7_object_to_c_string.  I'm passing a
string to use with fopen. The fopen fails (as does access()) if I use it,
but succeeds if I use s7_string to do the conversion.

Furthermore, if I print the char* string after conversion, it looks ok.

Is this a bug?

Thanks,

Gregg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20210720/6a8d63d6/attachment.html>


More information about the Cmdist mailing list