mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
Fix a few compiler warnings
This commit is contained in:
parent
483a491ed7
commit
08629ef1a0
@ -1887,9 +1887,13 @@ Dtool_StaticProperty_dealloc(PyDescrObject *descr) {
|
|||||||
static PyObject *
|
static PyObject *
|
||||||
Dtool_StaticProperty_repr(PyDescrObject *descr, const char *format) {
|
Dtool_StaticProperty_repr(PyDescrObject *descr, const char *format) {
|
||||||
#if PY_MAJOR_VERSION >= 3
|
#if PY_MAJOR_VERSION >= 3
|
||||||
return PyUnicode_FromFormat("<attribute '%s' of '%s'>", descr->d_name, descr->d_type->tp_name);
|
return PyUnicode_FromFormat("<attribute '%s' of '%s'>",
|
||||||
|
PyUnicode_AsUTF8(descr->d_name),
|
||||||
|
descr->d_type->tp_name);
|
||||||
#else
|
#else
|
||||||
return PyString_FromFormat("<attribute '%s' of '%s'>", descr->d_name, descr->d_type->tp_name);
|
return PyString_FromFormat("<attribute '%s' of '%s'>",
|
||||||
|
PyString_AS_STRING(descr->d_name),
|
||||||
|
descr->d_type->tp_name);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1907,7 +1911,11 @@ Dtool_StaticProperty_get(PyGetSetDescrObject *descr, PyObject *obj, PyObject *ty
|
|||||||
} else {
|
} else {
|
||||||
return PyErr_Format(PyExc_AttributeError,
|
return PyErr_Format(PyExc_AttributeError,
|
||||||
"attribute '%s' of type '%.100s' is not readable",
|
"attribute '%s' of type '%.100s' is not readable",
|
||||||
((PyDescrObject *)descr)->d_name,
|
#if PY_MAJOR_VERSION >= 3
|
||||||
|
PyUnicode_AsUTF8(((PyDescrObject *)descr)->d_name),
|
||||||
|
#else
|
||||||
|
PyString_AS_STRING(((PyDescrObject *)descr)->d_name),
|
||||||
|
#endif
|
||||||
((PyDescrObject *)descr)->d_type->tp_name);
|
((PyDescrObject *)descr)->d_type->tp_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1919,7 +1927,11 @@ Dtool_StaticProperty_set(PyGetSetDescrObject *descr, PyObject *obj, PyObject *va
|
|||||||
} else {
|
} else {
|
||||||
PyErr_Format(PyExc_AttributeError,
|
PyErr_Format(PyExc_AttributeError,
|
||||||
"attribute '%s' of type '%.100s' is not writable",
|
"attribute '%s' of type '%.100s' is not writable",
|
||||||
((PyDescrObject *)descr)->d_name,
|
#if PY_MAJOR_VERSION >= 3
|
||||||
|
PyUnicode_AsUTF8(((PyDescrObject *)descr)->d_name),
|
||||||
|
#else
|
||||||
|
PyString_AS_STRING(((PyDescrObject *)descr)->d_name),
|
||||||
|
#endif
|
||||||
((PyDescrObject *)descr)->d_type->tp_name);
|
((PyDescrObject *)descr)->d_type->tp_name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -106,6 +106,7 @@ do_task() {
|
|||||||
case DS_pickup:
|
case DS_pickup:
|
||||||
case DS_exit:
|
case DS_exit:
|
||||||
case DS_interrupt:
|
case DS_interrupt:
|
||||||
|
case DS_await:
|
||||||
// Just return these results through.
|
// Just return these results through.
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user