U
unbewust
i'd like to have, in my module options (is in FileUtils for ex) like
that in the Ruby side:
symt = SYMBOL_TEST.new( "/my/src/path", :verbose => true, :noop =>
true )
i know, from experiment, that, in my C init i get 2 VALUES in that
case the first being a RString the second an RHash.
if i look at ruby.h i get :
struct RHash {
struct RBasic basic;
struct st_table *tbl;
int iter_lev;
VALUE ifnone;
};
i didn't found anything about "struct st_table *tbl" i imagine that's
here the key/value pairs are stored ???
but how to retrieve them ???
generally speaking where could i find examples for each type of
struct ???
because i'll need in the near future the same kind of knoledge about :
struct RRegexp {
struct RBasic basic;
struct re_pattern_buffer *ptr;
long len;
char *str;
};
struct RFile {
struct RBasic basic;
struct OpenFile *fptr;
};
struct RData {
struct RBasic basic;
void (*dmark)(void*);
void (*dfree)(void*);
void *data;
};
best,
Yvon
that in the Ruby side:
symt = SYMBOL_TEST.new( "/my/src/path", :verbose => true, :noop =>
true )
i know, from experiment, that, in my C init i get 2 VALUES in that
case the first being a RString the second an RHash.
if i look at ruby.h i get :
struct RHash {
struct RBasic basic;
struct st_table *tbl;
int iter_lev;
VALUE ifnone;
};
i didn't found anything about "struct st_table *tbl" i imagine that's
here the key/value pairs are stored ???
but how to retrieve them ???
generally speaking where could i find examples for each type of
struct ???
because i'll need in the near future the same kind of knoledge about :
struct RRegexp {
struct RBasic basic;
struct re_pattern_buffer *ptr;
long len;
char *str;
};
struct RFile {
struct RBasic basic;
struct OpenFile *fptr;
};
struct RData {
struct RBasic basic;
void (*dmark)(void*);
void (*dfree)(void*);
void *data;
};
best,
Yvon