: void Data_Get_Struct(VALUE obj, type, type *svar)
    Ruby Υ֥ obj  type ؤΥݥ󥿤
    Ȥ svar ޤ

    

        struct mytype {
            int i;
            char *s;
        };

        VALUE
        my_i(self)
            VALUE self;
        {
            struct mytype *m;
            Data_Get_Struct(self, struct mytype, m);
            return INT2NUM(m->i);
        }

