A
Alex Katebi
[Note: parts of this message were removed to make it a legal post.]
Hi All,
When writing ruby extensions in C, how can I save C pointers into ruby
variables Bignum or Fixnum?
The only Macros available are INT2FIX, INT2NUM & FIX2INT and NUM2INT. I can
not save a pinter value that is 32 bits long.
example:
static VALUE round_trip(VALUE self, VALUE vptr)
{
void* ptr = NUM2INT(vptr);
return INT2NUM(ptr);
}
Hi All,
When writing ruby extensions in C, how can I save C pointers into ruby
variables Bignum or Fixnum?
The only Macros available are INT2FIX, INT2NUM & FIX2INT and NUM2INT. I can
not save a pinter value that is 32 bits long.
example:
static VALUE round_trip(VALUE self, VALUE vptr)
{
void* ptr = NUM2INT(vptr);
return INT2NUM(ptr);
}