[maemo-developers] python Re: [maemo-developers] Maemo 2.0 final release available
From: Gustavo Sverzut Barbieri barbieri at gmail.comDate: Mon Jul 10 17:22:20 EEST 2006
- Previous message: python Re: [maemo-developers] Maemo 2.0 final release available
- Next message: python Re: [maemo-developers] Maemo 2.0 final release available
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 7/10/06, Murray Cumming wrote: > > On 7/10/06, Murray Cumming wrote: > >> Are you talking about something that happens for every class, or just > >> during library initialization? Either way, I'd love to see the patch, if > >> you have a URL. > > > > PyGTK used to force calls to gtk_$CLASS_type() even for unused class, > > during initialization. > > > > About URL, they still use CVS, so there is not a snapshot about it > > all... you may base your view on the main commit file (_lazyutils.py): > > > > http://cvs.gnome.org/viewcvs/gnome-python/pygtk/gtk/_lazyutils.py?rev=1.1&view=log > > Thanks for the pointer. > > [snip] > > But I do think we can remove some symbols using the > > g_object_{set,get}_property(). If some class provides a property that > > maps to a function, like: > > > > GtkLabel: gtk_label_set_text, gtk_label_get_text > > > > we can avoid wrappers for these by using g_object_set and > > g_object_get. At least in Python these will save enough, because it > > would be done in Python itself, no "ld" is envolved, thus faster and > > less stuff on _gtk.so > > Yes, this is an advantage of Python's runtime-generated API that we don't > have in C++ and C. Of course, that causes runtime type problems instead of > compile-time problems, but if people are already using Python then they > are already content with that. > > You will need to be careful - a small percentage of the get/set_*_() > methods in GTK+ probably do something more than just get/setting the > property. Yes, it would need to be hand-pick. Anyway, I still need to evaluate how much space and time we save, I'll try to check it next week. -- Gustavo Sverzut Barbieri -------------------------------------- Jabber: barbieri at gmail.com MSN: barbieri at gmail.com ICQ#: 17249123 Skype: gsbarbieri Mobile: +55 (81) 9927 0010 Phone: +1 (347) 624 6296; 08122692 at sip.stanaphone.com GPG: 0xB640E1A2 @ wwwkeys.pgp.net
- Previous message: python Re: [maemo-developers] Maemo 2.0 final release available
- Next message: python Re: [maemo-developers] Maemo 2.0 final release available
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]