__len__binding don't work in 0.17.x versions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PyBindGen |
New
|
Undecided
|
Unassigned |
Bug Description
Binding of the __len__ function don't work anymore in pybindgen version >= 0.17.x when used with python2.7.
If I want to bind the __len__ method with a line looking like this:
mb.add_
(full code available there: https:/
The following code will fail:
```
import eigen3
a = eigen3.Vector3d()
len(a)
-------
SystemError Traceback (most recent call last)
<ipython-
----> 1 len(a)
SystemError: ../Objects/
```
Applying the joint patch fix the issue by forcing the use of PyLong_asSsize_t in python3 and PyInt_asSsize_t in python2.