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>2013-03-17 22:30:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-17 22:30:31 +0400
commit16b82845eee4198b2d56aa5a5c373008f5070f7f (patch)
tree36ca4f5c95b92ecc1e568459c783debf2151c6a5 /source/gameengine
parente2b2d083e0cd2c738962e2a4535acdfb17f37416 (diff)
code cleanup: add 'const' to headers to quiet msvc warnings, also remove (char *) casts that aren't needed now we're on Python3.3
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/GameLogic/SCA_PythonController.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_PolygonMaterial.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp6
-rw-r--r--source/gameengine/Ketsji/KX_PythonInitTypes.cpp6
-rw-r--r--source/gameengine/VideoTexture/PyTypeList.cpp2
-rw-r--r--source/gameengine/VideoTexture/blendVideoTex.cpp12
6 files changed, 15 insertions, 15 deletions
diff --git a/source/gameengine/GameLogic/SCA_PythonController.cpp b/source/gameengine/GameLogic/SCA_PythonController.cpp
index c2b1470ae7a..3a9e8ff0bbc 100644
--- a/source/gameengine/GameLogic/SCA_PythonController.cpp
+++ b/source/gameengine/GameLogic/SCA_PythonController.cpp
@@ -270,7 +270,7 @@ void SCA_PythonController::ErrorPrint(const char *error_msg)
* their user count. Not to mention holding references to wrapped data.
* This is especially bad when the PyObject for the wrapped data is freed, after blender
* has already dealocated the pointer */
- PySys_SetObject( (char *)"last_traceback", NULL);
+ PySys_SetObject("last_traceback", NULL);
PyErr_Clear(); /* just to be sure */
}
diff --git a/source/gameengine/Ketsji/KX_PolygonMaterial.cpp b/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
index 5ce370ccdfe..0f53c510cf7 100644
--- a/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
+++ b/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
@@ -154,7 +154,7 @@ bool KX_PolygonMaterial::Activate(RAS_IRasterizer* rasty, TCachingInfo& cachingI
{
PyErr_Print();
PyErr_Clear();
- PySys_SetObject( (char *)"last_traceback", NULL);
+ PySys_SetObject("last_traceback", NULL);
}
}
else
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index 22715214324..66333a061c5 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -1929,14 +1929,14 @@ PyObject *initGamePlayerPythonScripting(const STR_String& progname, TPythonSecur
/* mathutils types are used by the BGE even if we don't import them */
{
- PyObject *mod= PyImport_ImportModuleLevel((char *)"mathutils", NULL, NULL, NULL, 0);
+ PyObject *mod = PyImport_ImportModuleLevel("mathutils", NULL, NULL, NULL, 0);
Py_DECREF(mod);
}
#ifdef WITH_AUDASPACE
/* accessing a SoundActuator's sound results in a crash if aud is not initialized... */
{
- PyObject *mod= PyImport_ImportModuleLevel((char *)"aud", NULL, NULL, NULL, 0);
+ PyObject *mod = PyImport_ImportModuleLevel("aud", NULL, NULL, NULL, 0);
Py_DECREF(mod);
}
#endif
@@ -1993,7 +1993,7 @@ PyObject *initGamePythonScripting(const STR_String& progname, TPythonSecurityLev
#ifdef WITH_AUDASPACE
/* accessing a SoundActuator's sound results in a crash if aud is not initialized... */
{
- PyObject *mod= PyImport_ImportModuleLevel((char *)"aud", NULL, NULL, NULL, 0);
+ PyObject *mod= PyImport_ImportModuleLevel("aud", NULL, NULL, NULL, 0);
Py_DECREF(mod);
}
#endif
diff --git a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
index c6aa436537a..05bdb3463a6 100644
--- a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
@@ -172,9 +172,9 @@ void initPyTypes(void)
*/
/* For now just do PyType_Ready */
- PyObject *mod= PyModule_New("GameTypes");
- PyObject *dict= PyModule_GetDict(mod);
- PyDict_SetItemString(PySys_GetObject((char *)"modules"), (char *)"GameTypes", mod);
+ PyObject *mod = PyModule_New("GameTypes");
+ PyObject *dict = PyModule_GetDict(mod);
+ PyDict_SetItemString(PySys_GetObject("modules"), "GameTypes", mod);
Py_DECREF(mod);
diff --git a/source/gameengine/VideoTexture/PyTypeList.cpp b/source/gameengine/VideoTexture/PyTypeList.cpp
index 96ac1cc5b6b..99e9ae13e64 100644
--- a/source/gameengine/VideoTexture/PyTypeList.cpp
+++ b/source/gameengine/VideoTexture/PyTypeList.cpp
@@ -92,6 +92,6 @@ void PyTypeList::reg(PyObject *module)
// increase ref count
Py_INCREF((*it)->getType());
// add type to module
- PyModule_AddObject(module, (char*)(*it)->getName(), (PyObject *)(*it)->getType());
+ PyModule_AddObject(module, (*it)->getName(), (PyObject *)(*it)->getType());
}
}
diff --git a/source/gameengine/VideoTexture/blendVideoTex.cpp b/source/gameengine/VideoTexture/blendVideoTex.cpp
index 72415026bb9..e23bd1a3231 100644
--- a/source/gameengine/VideoTexture/blendVideoTex.cpp
+++ b/source/gameengine/VideoTexture/blendVideoTex.cpp
@@ -214,12 +214,12 @@ PyObject *initVideoTexture(void)
pyFilterTypes.reg(m);
Py_INCREF(&TextureType);
- PyModule_AddObject(m, (char*)"Texture", (PyObject *)&TextureType);
- PyModule_AddIntConstant(m, (char*)"SOURCE_ERROR", SourceError);
- PyModule_AddIntConstant(m, (char*)"SOURCE_EMPTY", SourceEmpty);
- PyModule_AddIntConstant(m, (char*)"SOURCE_READY", SourceReady);
- PyModule_AddIntConstant(m, (char*)"SOURCE_PLAYING", SourcePlaying);
- PyModule_AddIntConstant(m, (char*)"SOURCE_STOPPED", SourceStopped);
+ PyModule_AddObject(m, "Texture", (PyObject *)&TextureType);
+ PyModule_AddIntConstant(m, "SOURCE_ERROR", SourceError);
+ PyModule_AddIntConstant(m, "SOURCE_EMPTY", SourceEmpty);
+ PyModule_AddIntConstant(m, "SOURCE_READY", SourceReady);
+ PyModule_AddIntConstant(m, "SOURCE_PLAYING", SourcePlaying);
+ PyModule_AddIntConstant(m, "SOURCE_STOPPED", SourceStopped);
// init last error description
Exception::m_lastError = "";