On Nov 2, 2006, at 9:15 AM, Joey wrote:

> So, Im trying to move away from mkmf, and onto RubyInline.
> I can't work out how to define alloc functions from Inline, I tried
> something like:

[rearanged]

> but that makes Init_Y a instance method, and I'm unsure of how to  
> get the
> klass.
>
> Has anyone done this before?
>
> class Y
   ^^^^^^^

this says you are in a class.

>  inline :C do |builder|
>    builder.c <<-ENC
>      void Init_Y(){
>
>      }
>    ENC

Don't do this, define initialize instead.  If you need to add things  
to the Init method, use the hook for it (I forget what it is called).

>  end
> end

-- 
Eric Hodel - drbrain / segment7.net - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com