>>>>> "Y" == Yasushi Shoji <yashi / yashi.com> writes:

Y> I'm sorry, I don't think I get your point.  Are you suggesting to
Y> implement the method 's_dump', which returns class String, for class
Y> Data?

 Yes, if you can create a ruby object from your C struct, you can do it. You
just need to define the method "_dump" for your Data object.

 In this method, you :
  * create the object from the C struct
  * call Marshal#dump on this object to have a String
  * return this string

 You make the operation  inverse in the method "_load"

Y> if so, how do you handle c pointers?

 it depend if you can translate it to a ruby object.


Guy Decoux