| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Also added an unit test for infinite recursion when duck punching a
virtual method.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The assertion is only used in debug mode. The duck punching test
was altered to avoid failing when run with debug. Check the
duck punching test file for a better explanation.
Also added a debug helper method "showWrapperMap" to the binding
manager, it shows the contents of the C pointer to Python wrapper
mapping.
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
|
|
|
|
| |
We can't run they standalone anyway, because they need some env vars to be exported like PYTHONPATH.
|
|
The simplest definition of duck punching for our purposes is
the ability to change the definition of a method in an instance of
a class.
To allow this behaviour the SbkBaseWrapper structure had to be
extended with a 'ob_dict' which is a PyObject pointer to the instance
dictionary. It is originally set to NULL until the user tries to access
it. This dictionary could be accessed through the '__dict__' instance
property. For now it is read-only.
The generator was updated to handle the instance dictionary, and an
extensive duck punching test was also added.
Reviewed by Hugo Parente Lima <hugo.lima@openbossa.org>
|