[pygtk] h2def.py (very light :) improvement
xordoquy at linovia.com
Sat Aug 14 02:07:27 WST 2004
After digging a bit your patch, it appears that your expectations won't
match in OO design.
In the *_new function, the return type can be from the class of the
created object, but it can also be any type from the mother classes.
This is pretty commun in the gtk+ headers :
grep "_new" /opt/gnome26/include/gtk-2.0/gtk/* | grep GtkWidget | wc -l
GtkWidget* gtk_button_new (void);
GtkWidget *gtk_color_button_new (void);
GtkWidget* gtk_label_new (const char *str);
Could you rather tell me what you're trying to solve ?
I've made a couple of changes in h2def this year to improve the API
"Complexity has nothing to do with intelligence.
(Larry Bossidy, CEO, Allied Signal)
More information about the pygtk