Branch: Tag:

2006-01-02

2006-01-02 21:44:59 by Marcus Comstedt <marcus@mc.pp.se>

Implemented mixins and multiple inheritance.

Rev: src/post_modules/GTK2/build_pgtk.pike:1.6
Rev: src/post_modules/GTK2/output/few.pike:1.7
Rev: src/post_modules/GTK2/output/split.pike:1.6
Rev: src/post_modules/GTK2/output/util.pike:1.2
Rev: src/post_modules/GTK2/pgtk.h:1.12
Rev: src/post_modules/GTK2/pgtk2_symbol_remap.h:1.4
Rev: src/post_modules/GTK2/source/support.c:1.8

23:       /* Start output */    current_data += "#define EXTPRG extern\n"+sfhead; +  +  if(cls->mixin_for) +  current_data += "#define CLASS_TYPE MIXIN\n"; +     if( sizeof( cls->pre ) )    current_data += COMPOSE( cls->pre );    void output_thing( object thing )
74:    if( cls->name != "_global" )    {    exitfun += " free_program( p"+cls->c_name()+"_program );\n"; +  if( !cls->mixin_for )    type_switch =    "#ifdef "+cls->c_type_define()+"\n"    " if(PGTK_CHECK_TYPE(widget, "+cls->c_type_define()+"))\n"
86:    {    res +=    " start_new_program(); /* "+cls->name+" */\n"; -  if( cls->inherits ) -  res += " low_inherit( p"+cls->inherits->c_name()+ +  if( sizeof(cls->inherits) ) +  foreach( cls->inherits, Class c ) +  res += " low_inherit( p"+c->c_name()+    "_program,0,0,0,0,0);\n";    else    { -  res += " ADD_STORAGE(struct object_wrapper);\n"; +  res += " ADD_STORAGE(struct "+ +  (cls->mixin_for? "mixin_wrapper":"object_wrapper")+ +  ");\n";    }    }