I
Iñaki Baz Castillo
Hi, in a Ruby C extension I need to get a '\0' terminated string given
a Ruby string. I'm just interesed in Ruby 1.9.
I'm testing that RSTRING_PTR(str) does returns a '\0' terminated
string, ot it seems so, but I'm not sure. Source code says:
#define RSTRING_PTR(str) \
(!(RBASIC(str)->flags & RSTRING_NOEMBED) ? \
RSTRING(str)->as.ary : \
RSTRING(str)->as.heap.ptr)
Honestly, no idea about what it does
So, can somebody ensure me that RSTRING_PTR() returns a pointer to C
char finished with '\0'?
Thanks a lot.
--=20
I=C3=B1aki Baz Castillo
<[email protected]>
a Ruby string. I'm just interesed in Ruby 1.9.
I'm testing that RSTRING_PTR(str) does returns a '\0' terminated
string, ot it seems so, but I'm not sure. Source code says:
#define RSTRING_PTR(str) \
(!(RBASIC(str)->flags & RSTRING_NOEMBED) ? \
RSTRING(str)->as.ary : \
RSTRING(str)->as.heap.ptr)
Honestly, no idea about what it does
So, can somebody ensure me that RSTRING_PTR() returns a pointer to C
char finished with '\0'?
Thanks a lot.
--=20
I=C3=B1aki Baz Castillo
<[email protected]>