Hi,

In message "question about extending in C"
    on 02/04/25, "Richard P. Groenewegen" <rpg / xs2all.net> writes:

|But is there a way to do it without rb_eval_string (and with
|rb_funcall or whatever)?

rb_class_new_instance(argc, argv, klass) ?

|Additional question: Currently I have an empty init function (it just
|returns self), which I do bind to "initialize" in Init_Curve and I
|also call rb_obj_call_init from curve_init.
|
|    - Is it necessary to call rb_obj_call_init even though my init
|      function is empty?

Yes, if you expect your class to be subclassed.

|    - Is it necessary to define the init function at all?

No.  The empty "initialize" is already defined.

|Even more questions: I am rewriting a couple of ruby extensions
|(written in ruby) in C and I'm doing this one module at a time.  Let's
|say I have files called a.rb, b.rb, c.rb, where each file requires the
|previous file.  When writing a.c, b.c, c.c would you use
|
|    rb_require("b.so");
|
|in c.c or would you use a and b somehow on the C-level?

I'm not sure what you meant.  But rb_require("b.so") should work.

							matz.