Guest User

Untitled

a guest
May 27th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. NEWOBJ(klass, struct RClass);
  2. OBJSETUP(klass, rb_cClass, T_CLASS);
  3.  
  4. if (BUILTIN_TYPE(module) == T_ICLASS) {
  5. module = RBASIC(module)->klass;
  6. }
  7.  
  8. if (!RCLASS(module)->iv_tbl) {
  9. printf("iv tbl not exist, creating one\n");
  10. RCLASS(module)->iv_tbl = st_init_numtable();
  11. }
  12. klass->iv_tbl = RCLASS(module)->iv_tbl;
  13.  
  14.  
  15. if(TYPE(module) != T_OBJECT) {
  16. printf("subject is not an Object\n");
  17. klass->m_tbl = RCLASS(module)->m_tbl;
  18. klass->super = sup;
  19. }
Add Comment
Please, Sign In to add comment