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:
Diffstat (limited to 'source/gameengine/GameLogic/SCA_RandomSensor.cpp')
-rw-r--r--source/gameengine/GameLogic/SCA_RandomSensor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/gameengine/GameLogic/SCA_RandomSensor.cpp b/source/gameengine/GameLogic/SCA_RandomSensor.cpp
index 7199ee6cf22..4e93556453a 100644
--- a/source/gameengine/GameLogic/SCA_RandomSensor.cpp
+++ b/source/gameengine/GameLogic/SCA_RandomSensor.cpp
@@ -168,7 +168,7 @@ PyAttributeDef SCA_RandomSensor::Attributes[] = {
PyObject *SCA_RandomSensor::pyattr_get_seed(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
SCA_RandomSensor* self = static_cast<SCA_RandomSensor*>(self_v);
- return PyLong_FromSsize_t(self->m_basegenerator->GetSeed());
+ return PyLong_FromLong(self->m_basegenerator->GetSeed());
}
int SCA_RandomSensor::pyattr_set_seed(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
@@ -178,7 +178,7 @@ int SCA_RandomSensor::pyattr_set_seed(void *self_v, const KX_PYATTRIBUTE_DEF *at
PyErr_SetString(PyExc_TypeError, "sensor.seed = int: Random Sensor, expected an integer");
return PY_SET_ATTR_FAIL;
}
- self->m_basegenerator->SetSeed(PyLong_AsSsize_t(value));
+ self->m_basegenerator->SetSeed(PyLong_AsLong(value));
return PY_SET_ATTR_SUCCESS;
}