pike.git / src / post_modules / GTK2 / output / split.pike

version» Context lines:

pike.git/src/post_modules/GTK2/output/split.pike:12:   }      array files = ({});   static void output_class( Class cls, int lvl )   {    string current_data = "";       if( !cls->functions["_sprintf"] )    cls->create_default_sprintf();    +  cls->create_init_exit(); +     /* Start output */    current_data += "#define EXTPRG extern\n"+sfhead;    if( sizeof( cls->pre ) )    current_data += COMPOSE( cls->pre );    void output_thing( object thing )    {    if( mixed err=catch( current_data += thing->c_definition() ) )    werror(thing->file+":"+thing->line+": Error: "+    (stringp(err)?err:describe_backtrace(err))+"\n" );    };
pike.git/src/post_modules/GTK2/output/split.pike:83:    if( cls->name != "_global" )    {    res +=    " start_new_program(); /* "+cls->name+" */\n";    if( cls->inherits )    res += " low_inherit( p"+cls->inherits->c_name()+    "_program,0,0,0,0,0);\n";    else    {    res += " ADD_STORAGE(struct object_wrapper);\n"; -  res += " set_init_callback(pgtk_clear_obj_struct);\n"; +     }    }       foreach( sort( indices( cls->functions ) ), string f )    output_thing( cls->functions[ f ] );    foreach( sort( indices( cls->members ) ), string f )    output_thing( cls->members[ f ] );    if( cls->name != "_global" )    {    res += (" p"+cls->c_name()+"_program = end_program();\n"
pike.git/src/post_modules/GTK2/output/split.pike:109:    string str=S(cls->pike_name(),1,0,26);    predef::write("pike_name==%s\n",str);    array aaa=str/"\n";    string str1;    sscanf(aaa[1],"%*[ \t](%s)",str1);    predef::write("PSTR==%s\n",str1);   */    }    res += "}\n\n";    toplevel += res; +  +  if( cls->name == "_global" ) +  { +  if(sizeof(cls->init)) +  initfun += " gtk__init();\n"; +  if(sizeof(cls->exit)) +  exitfun += " gtk__exit();\n"; +  }    } )    werror(cls->file+":"+cls->line+": Error: "+    (stringp(e)?e:describe_backtrace(e))+"\n" );      }      string make_initfun()   {    string res = "";    string line = "";