From: unbewusst Date: 2007-08-18T20:59:59+09:00 Subject: [C ext to Ruby] how to read a ruby symbol from C ? I'm now able to produce a ruby symbol from C I'm also able to read the keys of a hash, i need to know how to transform a key being a T_SYMBOL into a cstring (the reverse) ??? also using : long size = RHASH( ( VALUE )options_hash )->tbl->num_entries; i get the following error at compil time : symbol_test.c: In function m_symbol_test_init: symbol_test.c:109: error: dereferencing pointer to incomplete type i don't understand very much this message. however i can get the hash size by : hlen = RARRAY( keys )->len; with : VALUE keys = rb_funcall( options_hash, rb_intern( "keys" ), 0 ); my "options_hash" is coming from : rb_scan_args( argc, argv, "11", &src_path, &options_hash ); it is a VALUE : VALUE src_path, options_hash, noop, verbose; help appreciated, Yvon