B
Brian Schröder
Hello Group,
in an extension I'm writing I'd like to hash ruby objects to
c-structs. I'd like to do this without wrapping the c-structs again in
ruby objects, because that would double the number of object creations
and GC actions. I could take the st_hash and partially redo ruby's
hash wrapping to achieve what I want, but maybe there is a nicer way
to do this?
I want my hash to behave like a ruby hash regarding wrapping of string
arguments etc. That means I do not simply want to hash VALUES to void*
pointers but first freeze strings an do the things ruby does (if
possible without copying the code in hash.c, such that my extension
will always be in sync with ruby's behaviour.)
best regards,
Brian
--=20
http://ruby.brian-schroeder.de/
Stringed instrument chords: http://chordlist.brian-schroeder.de/
in an extension I'm writing I'd like to hash ruby objects to
c-structs. I'd like to do this without wrapping the c-structs again in
ruby objects, because that would double the number of object creations
and GC actions. I could take the st_hash and partially redo ruby's
hash wrapping to achieve what I want, but maybe there is a nicer way
to do this?
I want my hash to behave like a ruby hash regarding wrapping of string
arguments etc. That means I do not simply want to hash VALUES to void*
pointers but first freeze strings an do the things ruby does (if
possible without copying the code in hash.c, such that my extension
will always be in sync with ruby's behaviour.)
best regards,
Brian
--=20
http://ruby.brian-schroeder.de/
Stringed instrument chords: http://chordlist.brian-schroeder.de/