Skip to content
Commit 35f79b22 authored by Simon Feltman's avatar Simon Feltman
Browse files

Add callable and descriptor protocols to PyGICallableInfo

Add tp_call (__call__) function to callable info objects.
This allows for replacement of wrapped invoke methods directly
with the already created callable info object. This has the
additional side effect of making doc strings lazily bound
(only generated when __doc__ is accessed).

Add tp_desc_get (__get__) to PyGIFunctionInfo which returns
a bound version of itself for methods and constructors.

Update various internal type checks to reflect the changes.
Update tests to reflect the new callable type being the same
across Python 2 & 3.

This patch gives roughly a %17 speedup for Gtk imports and
an %11 speedup for GI method calls.

https://bugzilla.gnome.org/show_bug.cgi?id=704037
parent 2339e030
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment