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-02-21 15:43:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-02-21 15:43:24 +0300
commit9d5c2af1d1e11d40fec6c0da96cb37de1684f13c (patch)
tree2f59b3a9179b98a1dc6893af3ac2258cbea196c1 /source/gameengine/Expressions
parenta3b684d69878eaff3e0ad475264485419e0c029f (diff)
* removed typedefs that were not used (from anonymous enums and structs)
* Missed some cases of using a 'char *' as an attribute * replace BGE's Py_Return macro with Pythons Py_RETURN_NONE * other minor warnings removed
Diffstat (limited to 'source/gameengine/Expressions')
-rw-r--r--source/gameengine/Expressions/ListValue.cpp2
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.cpp1
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.h9
3 files changed, 4 insertions, 8 deletions
diff --git a/source/gameengine/Expressions/ListValue.cpp b/source/gameengine/Expressions/ListValue.cpp
index 3cf22bdc9bd..b8a8a1a63b2 100644
--- a/source/gameengine/Expressions/ListValue.cpp
+++ b/source/gameengine/Expressions/ListValue.cpp
@@ -429,7 +429,7 @@ PyObject* CListValue::Pyreverse(PyObject* self,
{
std::reverse(m_pValueArray.begin(),m_pValueArray.end());
- Py_Return;
+ Py_RETURN_NONE;
}
diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp
index 16184b7c5f2..2c4fbd5a867 100644
--- a/source/gameengine/Expressions/PyObjectPlus.cpp
+++ b/source/gameengine/Expressions/PyObjectPlus.cpp
@@ -697,7 +697,6 @@ bool PyObjectPlus::isA(const char *mytypename) // check typename of each parent
PyObject *PyObjectPlus::Py_isA(PyObject *value) // Python wrapper for isA
{
- char *mytypename;
if (!PyString_Check(value)) {
PyErr_SetString(PyExc_TypeError, "expected a string");
return NULL;
diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h
index 5ba894ef23a..0fae175e3cf 100644
--- a/source/gameengine/Expressions/PyObjectPlus.h
+++ b/source/gameengine/Expressions/PyObjectPlus.h
@@ -72,9 +72,6 @@ typedef int Py_ssize_t;
#define PY_METHODCHAR const char *
#endif
- // some basic python macros
-#define Py_Return { Py_INCREF(Py_None); return Py_None;}
-
static inline void Py_Fatal(const char *M) {
//cout << M << endl;
exit(-1);
@@ -394,10 +391,10 @@ public:
// isA methods
bool isA(PyTypeObject *T);
bool isA(const char *mytypename);
- PyObject *Py_isA(PyObject *args);
- static PyObject *sPy_isA(PyObject *self, PyObject *args, PyObject *kwd)
+ PyObject *Py_isA(PyObject *value);
+ static PyObject *sPy_isA(PyObject *self, PyObject *value)
{
- return ((PyObjectPlus*)self)->Py_isA(args);
+ return ((PyObjectPlus*)self)->Py_isA(value);
}
};