From f9c53b39a27ca10c7a9fecc4e71d50349d64d411 Mon Sep 17 00:00:00 2001 From: erwincoumans Date: Sun, 28 May 2017 09:48:12 -0700 Subject: [PATCH] fix pybullet build on some MSVC versions --- examples/pybullet/pybullet.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/examples/pybullet/pybullet.c b/examples/pybullet/pybullet.c index 1ea93fb7e..8440cfc42 100644 --- a/examples/pybullet/pybullet.c +++ b/examples/pybullet/pybullet.c @@ -695,7 +695,7 @@ static PyObject* pybullet_getDynamicsInfo(PyObject* self, PyObject* args, PyObje int status_type = 0; b3SharedMemoryCommandHandle cmd_handle; b3SharedMemoryStatusHandle status_handle; - + struct b3DynamicsInfo info; if (bodyUniqueId < 0) { PyErr_SetString(SpamError, "getDynamicsInfo failed; invalid bodyUniqueId"); @@ -714,7 +714,7 @@ static PyObject* pybullet_getDynamicsInfo(PyObject* self, PyObject* args, PyObje PyErr_SetString(SpamError, "getDynamicsInfo failed; invalid return status"); return NULL; } - struct b3DynamicsInfo info; + if (b3GetDynamicsInfo(status_handle, &info)) { PyObject* pyDynamicsInfo = PyTuple_New(2); @@ -1450,33 +1450,39 @@ static PyObject* pybullet_setJointMotorControlArray(PyObject* self, PyObject* ar for (i=0;i