Fix errors with built options disabled PyAPI C++ refactor

Resolve issues from 6fcecb7e46
This commit is contained in:
Campbell Barton
2023-07-21 10:53:30 +10:00
parent 6fcecb7e46
commit ae5682fa10
7 changed files with 7 additions and 7 deletions

View File

@@ -60,7 +60,7 @@ static PyObject *make_alembic_info(void)
SetObjItem(PyUnicode_FromFormat("%2d, %2d, %2d", major, minor, patch));
#else
SetObjItem(PyBool_FromLong(0));
SetObjItem(PyC_Tuple_Pack_I32(0, 0, 0));
SetObjItem(PyC_Tuple_Pack_I32({0, 0, 0}));
SetStrItem("Unknown");
#endif

View File

@@ -65,7 +65,7 @@ static PyObject *make_ocio_info(void)
"%2d, %2d, %2d", curversion >> 24, (curversion >> 16) % 256, (curversion >> 8) % 256));
#else
SetObjItem(PyBool_FromLong(0));
SetObjItem(PyC_Tuple_Pack_I32(0, 0, 0));
SetObjItem(PyC_Tuple_Pack_I32({0, 0, 0}));
SetStrItem("Unknown");
#endif

View File

@@ -58,7 +58,7 @@ static PyObject *make_opensubdiv_info(void)
"%2d, %2d, %2d", curversion / 10000, (curversion / 100) % 100, curversion % 100));
#else
SetObjItem(PyBool_FromLong(0));
SetObjItem(PyC_Tuple_Pack_I32(0, 0, 0));
SetObjItem(PyC_Tuple_Pack_I32({0, 0, 0}));
SetStrItem("Unknown");
#endif

View File

@@ -62,7 +62,7 @@ static PyObject *make_openvdb_info(void)
"%2d, %2d, %2d", curversion >> 24, (curversion >> 16) % 256, (curversion >> 8) % 256));
#else
SetObjItem(PyBool_FromLong(0));
SetObjItem(PyC_Tuple_Pack_I32(0, 0, 0));
SetObjItem(PyC_Tuple_Pack_I32({0, 0, 0}));
SetStrItem("Unknown");
#endif

View File

@@ -97,7 +97,7 @@ static PyObject *make_sdl_info(void)
#else /* WITH_SDL=OFF */
SetObjItem(PyBool_FromLong(0));
SetObjItem(PyC_Tuple_Pack_I32(0, 0, 0));
SetObjItem(PyC_Tuple_Pack_I32({0, 0, 0}));
SetStrItem("Unknown");
SetObjItem(PyBool_FromLong(0));
#endif

View File

@@ -61,7 +61,7 @@ static PyObject *make_usd_info(void)
SetObjItem(PyUnicode_FromFormat("%2d, %2d, %2d", major, minor, patch));
#else
SetObjItem(PyBool_FromLong(0));
SetObjItem(PyC_Tuple_Pack_I32(0, 0, 0));
SetObjItem(PyC_Tuple_Pack_I32({0, 0, 0}));
SetStrItem("Unknown");
#endif

View File

@@ -709,7 +709,7 @@ int BaseMathObject_clear(BaseMathObject *self)
static bool BaseMathObject_is_tracked(BaseMathObject *self)
{
PyObject *cb_user = self->cb_user;
self->cb_user = (void *)(uintptr_t)-1;
self->cb_user = (PyObject *)uintptr_t(-1);
bool is_tracked = PyObject_GC_IsTracked((PyObject *)self);
self->cb_user = cb_user;
return is_tracked;