rb_cObject vs. rb_cData

  • Thread starter Nikolai Weibull
  • Start date
C

Charles Mills

Nikolai said:
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
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: rb_cObject vs. rb_cData"

|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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,169
Messages
2,570,919
Members
47,458
Latest member
Chris#

Latest Threads

Top