On 8/3/07, unbewust <yvon.thoraval / gmail.com> wrote:
>
> BUT, for the time being in order to use, from C, the RAliasFile class,
> i'm obliged to use :
>
> rb_eval_string("require '/absolute/path/to/raliasfile'");


rb_require( "relative/path/to/raliasfile" );

My preference is relative paths. Eventually you'll want to release
this as a gem to other developers, and they might not have the exact
some directory structure that you do.


>
> then to return an instance of this class :
>
> VALUE alias = rb_eval_string("RAliasFile.new(arg)");
>

VALUE alias = rb_class_new_instance( 1, args, RAliasFile );

Where 1 is the number of arguments in the args array, args is the
array of arguments (as a VALUE*), and RAliasFile is a reference to the
class you would like to create.

>
> also is my dir hierarchy shown above the best way ?
>

Unless you need separate modules, I would flatten your directory tree
-- i.e. consolidate all the files in your ext/lib folder up into the
ext folder.

>
> any comment appreciated ;-)
>

Hope these were helpful suggestions.

Blessings,
TwP