From b1d6f58981573c3a7ef38278b5bac44c5e7ae426 Mon Sep 17 00:00:00 2001 From: erwincoumans Date: Sun, 24 Sep 2017 09:16:54 -0700 Subject: [PATCH] Update pybullet.c fix compile issue --- examples/pybullet/pybullet.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/pybullet/pybullet.c b/examples/pybullet/pybullet.c index 9290df7dc..630135eae 100644 --- a/examples/pybullet/pybullet.c +++ b/examples/pybullet/pybullet.c @@ -7036,10 +7036,12 @@ static PyObject* pybullet_calculateJacobian(PyObject* self, PyObject* args, PyOb angularJacobian); if (linearJacobian) { + int r; PyObject* pymat = PyTuple_New(3); - for (int r = 0; r < 3; ++r) { + for (r = 0; r < 3; ++r) { + int c; PyObject* pyrow = PyTuple_New(dofCount); - for (int c = 0; c < dofCount; ++c) { + for (c = 0; c < dofCount; ++c) { int element = r * dofCount + c; PyTuple_SetItem(pyrow, c, PyFloat_FromDouble(linearJacobian[element])); @@ -7050,10 +7052,12 @@ static PyObject* pybullet_calculateJacobian(PyObject* self, PyObject* args, PyOb } if (angularJacobian) { + int r; PyObject* pymat = PyTuple_New(3); - for (int r = 0; r < 3; ++r) { + for (r = 0; r < 3; ++r) { + int c; PyObject* pyrow = PyTuple_New(dofCount); - for (int c = 0; c < dofCount; ++c) { + for (c = 0; c < dofCount; ++c) { int element = r * dofCount + c; PyTuple_SetItem(pyrow, c, PyFloat_FromDouble(linearJacobian[element]));