pike.git
/
src
/
post_modules
/
GTK2
/
output
/
split.pike
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/post_modules/GTK2/output/split.pike:16:
{ 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(cls->mixin_for)
+
current_data += "#define CLASS_TYPE MIXIN\n";
+
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" ); }; foreach( sort( indices( cls->functions ) ), string fun )
pike.git/src/post_modules/GTK2/output/split.pike:67:
void output_thing( mixed thing ) { if( mixed err=catch( res += thing->pike_add() ) ) werror(thing->file+":"+thing->line+": Error: "+ (stringp(err)?err:describe_backtrace(err))+"\n" ); }; 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" " return p"+cls->c_name()+"_program;\n" "#endif\n"+type_switch; } res = "static void _"+init_n+"()\n{\n"; if( cls->name != "_global" ) { 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";
} } 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"