Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NEWOBJ(klass, struct RClass);
- OBJSETUP(klass, rb_cClass, T_CLASS);
- if (BUILTIN_TYPE(module) == T_ICLASS) {
- module = RBASIC(module)->klass;
- }
- if (!RCLASS(module)->iv_tbl) {
- printf("iv tbl not exist, creating one\n");
- RCLASS(module)->iv_tbl = st_init_numtable();
- }
- klass->iv_tbl = RCLASS(module)->iv_tbl;
- if(TYPE(module) != T_OBJECT) {
- printf("subject is not an Object\n");
- klass->m_tbl = RCLASS(module)->m_tbl;
- klass->super = sup;
- }
Add Comment
Please, Sign In to add comment