[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

rb_cObject vs. rb_cData

Nikolai Weibull

3/3/2005 9:24:00 PM

OK, what's the deal with rb_cData? When do I use it?
nikolai

--
::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}


2 Answers

Charles Mills

3/3/2005 10:25:00 PM

0


Nikolai Weibull wrote:
> OK, what's the deal with rb_cData? When do I use it?
> nikolai
>
> --
> ::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::
> ::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
> ::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 :::
> main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

I think the short answer is you don't use it. There is T_DATA which is
the type of the Ruby object returned by Data_Make_Struct() and
Data_Wrap_Struct().

-Charlie

Yukihiro Matsumoto

3/3/2005 10:45:00 PM

0

Hi,

In message "Re: rb_cObject vs. rb_cData"
on Fri, 4 Mar 2005 06:23:55 +0900, Nikolai Weibull <mailing-lists.ruby-talk@rawuncut.elitemail.org> writes:

|OK, what's the deal with rb_cData? When do I use it?

When you want to wrap C pointer into Ruby object in a C extension for
Ruby, and have no need to define any data specific behavior. To tell
the truth, it's not much useful.

matz.