BGE: Fix T41570: Blender crash when physics createConstraint

Move physicsid type to unsigned long long to avoid crashes on Windows 8.1 64bits.
Other systems also modified to put them inline with this solution.

Reviewers: dfelinto, brita_, moguri, juicyfruit, campbellbarton

Reviewed By: juicyfruit, campbellbarton

Subscribers: juicyfruit

Differential Revision: https://developer.blender.org/D1122
This commit is contained in:
Jorge Bernal
2015-02-18 19:52:54 +01:00
parent 839a6b22d6
commit 9bd2a7c0a8
2 changed files with 12 additions and 47 deletions

View File

@@ -36,14 +36,6 @@
# pragma warning( disable:4786 )
#endif
#if defined(_WIN64) && !defined(FREE_WINDOWS64)
typedef unsigned __int64 uint_ptr;
#elif defined(FREE_WINDOWS64)
typedef unsigned long long uint_ptr;
#else
typedef unsigned long uint_ptr;
#endif
#include "RAS_IPolygonMaterial.h"
#include "KX_BlenderMaterial.h"
#include "KX_GameObject.h"
@@ -3294,12 +3286,12 @@ PyObject *KX_GameObject::PyGetAxisVect(PyObject *value)
PyObject *KX_GameObject::PyGetPhysicsId()
{
PHY_IPhysicsController* ctrl = GetPhysicsController();
uint_ptr physid=0;
unsigned long long physid = 0;
if (ctrl)
{
physid= (uint_ptr)ctrl;
physid = (unsigned long long)ctrl;
}
return PyLong_FromLong((long)physid);
return PyLong_FromUnsignedLongLong(physid);
}
PyObject *KX_GameObject::PyGetPropertyNames()