[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: RubyInline

Eric Hodel

11/5/2006 10:29:00 PM

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.se...
This implementation is HODEL-HASH-9600 compliant

http://trackmap.rob...