1. Python CFFI
  2. Untitled project
  3. cffi
  4. Issues
Issue #51 resolved

Can't pass float tuple for float * argument with CPython

Leonard Ritter
created an issue

with following exported method

void _bt_btTransform_setFromOpenGLMatrix(btTransform *self, float* m);

this call succeeds with PyPy but fails on CPython (with CFFI Trunk ~0.5):

_bt_btTransform_setFromOpenGLMatrix(self._ptr, (1.0, 1.0, 1.0, ...))

Resulting in following error:

  File "C:\devel\pybullet-cffi\bullet\proxy.py", line 104, in setFromOpenGLMatrix
    _bt_btTransform_setFromOpenGLMatrix(self._ptr, m)
  File "C:\devel\pybullet-cffi\bullet\internal.py", line 99, in newfunc
    result = func(*args)
TypeError: initializer for ctype 'float *' must be a cdata pointer, not tuple

Comments (1)

  1. Log in to comment