Hi,

In the Ruby-C world, we can make an association between a Ruby class and a
C struct through the use of Data_Wrap_Struct().  But in the Ruby world, a
Ruby class can inherit from a parent, which in turn inherits from its
parent, and so on.  Suppose each class in this inheritance chain has
different data in its struct.  Is the following a good model for the
corresponding C struct's?

    typedef struct
    {
        /* pointer to parent */
        void *parentData;
        void (*parentMarkFunc) (void*);
        void (*parentFreeFunc) (void*);

        /* class-specific data */
        ....
    } sClass_Any;

(Is there any reference on how to do object-orientation in C?  Well, C++
is excluded for now.)

Regards,

Bill