[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:01926] Re: object creation

From: Clemens Hintze <c.hintze@...>
Date: 2000-03-16 21:24:40 UTC
List: ruby-talk #1926
Andrew Hunt writes:

...

> What I am trying to understand is the most legitimate way
> to create objects from C.  In the case of built-in classes,
> a "C-constructor" is available (rb_str_new, etc).  For extension
> classes, the question is a little murkier.  I think the best
> answer is that your own class should use Wrap_Struct/Make_Struct
> and rb_bj_call_init, and that it should provide a C-level
> constructor for others to use.  If that's not available, then
> the next best thing would be to use funcall to call the "new"
> method of the class.  I don't see any case where it
> it would be prudent to call NEWOBJ/SETUPOBJ or poke around in
> the internals of another class in order to instantiate it.
> 
> Does this sound okay? Or am I missing something?

That sounds okay for me. But please read also my reply to
[ruby-talk:01922]. 

BTW: It is really strange today with the mails from ruby-talk. I get
them totally unordered. Most often the answers reach me before the
question ;-)))

> /\ndy

\cle

...

> Our New Book: "The Pragmatic Programmer" Published by Addison-Wesley
> Oct 1999
      ???? 

Really?!? Damned I have totally missed it! Or is it just another Y2K
bug??? ;-)

...

-- 
Clemens Hintze  mailto: c.hintze@gmx.net

In This Thread

Prev Next