[#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:01921] Re: object creation

From: Clemens Hintze <c.hintze@...>
Date: 2000-03-16 18:36:34 UTC
List: ruby-talk #1921
Yukihiro Matsumoto writes:
> 
> In message "[ruby-talk:01894] Re: object creation"
>     on 00/03/16, Andrew Hunt <andy@Toolshed.Com> writes:
> 
> |	>Yes.  But I think it's better for T_DATA object to use
> |	>Data_Make_Struct/Data_Wrap_Struct, as Clemens stated.
> |
> |Agreed, but here's my real question: suppose you have a non-built-
> |in class such as MD5, which does not expose a C-level constructor
> |(something like rb_str_new, rb_time_new, etc).  What is the 
> |preferred way to create a new MD5 object from C code?
> 
> I haven't settled my mind yet about this.
> 
> If you want to preserve `initialize' behavior, here's the way:
> 

Perhaps I have misunderstood Andy, but I thought he suppose to have a
class MD5 that already exists as e.g. extension. But it has no
e.g. rb_md5_new function serving as C constructor like all built-in
classes of Ruby have!

In another extension, he wants to create an instance of just this MD5
class on C level.

I have already send an answer for that case. If I was wrong, however,
please ignore my sermon :-)

...

> 							matz.

\cle

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

In This Thread

Prev Next