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:
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2005-04-23 16:25:21 +0400
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2005-04-23 16:25:21 +0400
commit0dcba86c6b631a31eadb5e8805c5c94222559e25 (patch)
tree06ab18aaeed6567bd4af7696d83f847adf5249bb /source/gameengine/Expressions
parent10acf20645729d7c06eec1b091a0bf21417d613f (diff)
Added the docs & use Python booleans for physics reinstance.
Diffstat (limited to 'source/gameengine/Expressions')
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h
index 8784d28d502..c261012a3bc 100644
--- a/source/gameengine/Expressions/PyObjectPlus.h
+++ b/source/gameengine/Expressions/PyObjectPlus.h
@@ -49,12 +49,22 @@
// some basic python macros
#define Py_NEWARGS 1
#define Py_Return { Py_INCREF(Py_None); return Py_None;}
+static inline PyObject* Py_Success(bool truth)
+{
+ if (truth)
+ {
+ Py_INCREF(Py_True);
+ return Py_True;
+ }
+ Py_INCREF(Py_False);
+ return Py_False;
+}
#define Py_Error(E, M) {PyErr_SetString(E, M); return NULL;}
#define Py_Try(F) {if (!(F)) return NULL;}
#define Py_Assert(A,E,M) {if (!(A)) {PyErr_SetString(E, M); return NULL;}}
-inline void Py_Fatal(char *M) {
+static inline void Py_Fatal(char *M) {
//cout << M << endl;
exit(-1);
};