Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-06-29 06:25:54 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-06-29 06:25:54 +0400
commitc50bbe5ae726edfb265bd54cb7ce0e547e3f4b31 (patch)
tree2fcb879d619b0794a7632575f64e5825949de4cf /source/gameengine/GameLogic/SCA_IController.cpp
parentbb1f24ac443bcc386cf2cc3765609aaf9bf51db1 (diff)
BGE Py API using python3 c/api calls. include bpy_compat.h to support py2.x
Diffstat (limited to 'source/gameengine/GameLogic/SCA_IController.cpp')
-rw-r--r--source/gameengine/GameLogic/SCA_IController.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/gameengine/GameLogic/SCA_IController.cpp b/source/gameengine/GameLogic/SCA_IController.cpp
index 7880daf0eb4..4b7c462b6f7 100644
--- a/source/gameengine/GameLogic/SCA_IController.cpp
+++ b/source/gameengine/GameLogic/SCA_IController.cpp
@@ -263,7 +263,7 @@ PyObject* SCA_IController::PyGetSensor(PyObject* value)
{
ShowDeprecationWarning("getSensor(string)", "the sensors[string] property");
- char *scriptArg = PyString_AsString(value);
+ char *scriptArg = _PyUnicode_AsString(value);
if (scriptArg==NULL) {
PyErr_SetString(PyExc_TypeError, "controller.getSensor(string): Python Controller, expected a string (sensor name)");
return NULL;
@@ -287,7 +287,7 @@ PyObject* SCA_IController::PyGetActuator(PyObject* value)
{
ShowDeprecationWarning("getActuator(string)", "the actuators[string] property");
- char *scriptArg = PyString_AsString(value);
+ char *scriptArg = _PyUnicode_AsString(value);
if (scriptArg==NULL) {
PyErr_SetString(PyExc_TypeError, "controller.getActuator(string): Python Controller, expected a string (actuator name)");
return NULL;
@@ -322,13 +322,13 @@ PyObject* SCA_IController::PyGetSensors()
PyObject* SCA_IController::PyGetState()
{
ShowDeprecationWarning("getState()", "the state property");
- return PyInt_FromLong(m_statemask);
+ return PyLong_FromSsize_t(m_statemask);
}
PyObject* SCA_IController::pyattr_get_state(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
SCA_IController* self= static_cast<SCA_IController*>(self_v);
- return PyInt_FromLong(self->m_statemask);
+ return PyLong_FromSsize_t(self->m_statemask);
}
PyObject* SCA_IController::pyattr_get_sensors(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)