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: [EMAIL PROTECTED]
  MSN: [EMAIL PROTECTED]
 ICQ#: 17249123
Skype: gsbarbieri
Mobile: +55 (81) 9927 0010
Phone:  +1 (347) 624 6296; [EMAIL PROTECTED]
  GPG: 0xB640E1A2 @ wwwkeys.pgp.net
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to