[C ext 2 Ruby] questions about rb_iv_set/get

U

Une bévue

i do have some questions about rb_iv_set/get in order to know if i must
** OR NOT ** free mem allocation relevant to VALUEs passed to rb_iv_set
?

are only pointers stored ore copies of strings ?
 
P

pat eyler

i do have some questions about rb_iv_set/get in order to know if i must
** OR NOT ** free mem allocation relevant to VALUEs passed to rb_iv_set
?

are only pointers stored ore copies of strings ?

I'm afraid I can't help you with your question, but I can help you get
more answers. It's a simple thing, just don't post with the broken
[EXTRA TAGS THAT MAKE YOUR SUBJECT HARD TO READ] subject
line.



--=20
thanks,
-pate
 
T

Timothy Hunter

Une said:
i do have some questions about rb_iv_set/get in order to know if i must
** OR NOT ** free mem allocation relevant to VALUEs passed to rb_iv_set
?

are only pointers stored ore copies of strings ?
Assuming you're using one of the rb_str_new family of functions to
create Ruby String objects from C strings, Ruby makes a copy of the C
string in Ruby-managed memory. In general Ruby objects are always in
Ruby-managed memory unless you're wrapping one of your own C structures
into a Ruby object with Data_Wrap_Struct.
 
U

Une bévue

Timothy Hunter said:
Assuming you're using one of the rb_str_new family of functions to
create Ruby String objects from C strings, Ruby makes a copy of the C
string in Ruby-managed memory. In general Ruby objects are always in
Ruby-managed memory unless you're wrapping one of your own C structures
into a Ruby object with Data_Wrap_Struct.

ok, fine, thanks, for this precise answer !
 
U

Une bévue

pat eyler said:
I can help you get
more answers. It's a simple thing, just don't post with the broken
[EXTRA TAGS THAT MAKE YOUR SUBJECT HARD TO READ] subject
line.

what are those exactly ? the "[C ext 2 Ruby]" : for my point of view it
is to advert people this thread speaks about "C ext 2 Ruby", not all are
interested...

or, is it for the "/" of "rb_iv_set/get" ???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top