Is this usage of RSTRING_PTR correct? RSTRING_PTR returns a pointer to the Ruby-allocated memory for the string, and the previous usage is indeed suspicious because the documentation states that the returned string is not guaranteed to be null-terminated.
Is this usage of RSTRING_PTR correct? RSTRING_PTR returns a pointer to the Ruby-allocated memory for the string, and the previous usage is indeed suspicious because the documentation states that the returned string is not guaranteed to be null-terminated.
The correct usage would be:
_Originally posted by @pepone in https://github.com/zeroc-ice/ice/pull/2340#discussion_r1652302932_