This is the generated code:
void pgtk2_container_add( INT32 args ) #line 25 "/home/riffraff/src/Pike-v7.8.306/src/post_modules/GTK2/source/gtkcontainer.pre" { GtkWidget *a0; if( args < 1 ) Pike_error(/* "Too few arguments, %d required, got %d\n" */ (PSTR+0x2e), 1, args);
if( Pike_sp[ 0 - args ].type != PIKE_T_OBJECT ) a0 = NULL; else a0 = GTK_WIDGET(get_pg2object(Pike_sp[0-args].u.object, pgtk2_widget_program)); pgtk2_verify_inited(); gtk_container_add( GTK_CONTAINER(THIS->obj), GTK_WIDGET(a0) ); RETURN_THIS(); }
The only real difference I see is the call to get_pg2object, pgtk2_widget_program above vice pg2_object_program for my fix (because get_gobject() gets an object as a pg2_object_program).
I could rewrite my fix to grab pgtk2_widget_program instead and see what happens.
----- Original Message ---- From: Lance Dillon riffraff169@yahoo.com To: pike-devel@lists.lysator.liu.se Sent: Thursday, June 25, 2009 9:16:32 PM Subject: Re: GTK2.Container
That is a good question. I'm doing a test now. I knew what the problem was, and my solution fixed it, but I didn't look at the generated code.
----- Original Message ---- From: "Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum" 10353@lyskom.lysator.liu.se To: pike-devel@lists.lysator.liu.se Sent: Thursday, June 25, 2009 7:00:02 PM Subject: Re: GTK2.Container
Hm, how does this differ from the generated code? Maybe the code generation is wrong?