aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/py/source
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2005-07-06 21:39:26 +0000
committerThomas Grill <xovo@users.sourceforge.net>2005-07-06 21:39:26 +0000
commitdb7bcd346529c35eee37d356138c971f32e3f795 (patch)
tree45fff72e60a714ed60a08d18fc67da0487baf26e /externals/grill/py/source
parent5d14209a5a69687e2ce8fe94f3c39cd005c514c7 (diff)
added xcode project
better reload handling, but still far fom perfect fixed minor other issues bumped version number made some methods static svn path=/trunk/; revision=3296
Diffstat (limited to 'externals/grill/py/source')
-rw-r--r--externals/grill/py/source/main.cpp6
-rw-r--r--externals/grill/py/source/main.h14
2 files changed, 13 insertions, 7 deletions
diff --git a/externals/grill/py/source/main.cpp b/externals/grill/py/source/main.cpp
index fa5169b7..428afea7 100644
--- a/externals/grill/py/source/main.cpp
+++ b/externals/grill/py/source/main.cpp
@@ -624,3 +624,9 @@ bool pybase::collect()
}
return true;
}
+
+/*
+PY_EXPORT PyThreadState *py_Lock(PyThreadState *st = NULL) { return pybase::PyLock(st?st:pybase::FindThreadState()); }
+PY_EXPORT PyThreadState *py_LockSys() { return pybase::PyLockSys(); }
+PY_EXPORT void py_Unlock(PyThreadState *st) { pybase::PyUnlock(st); }
+*/
diff --git a/externals/grill/py/source/main.h b/externals/grill/py/source/main.h
index 23a9ccb0..0b94274e 100644
--- a/externals/grill/py/source/main.h
+++ b/externals/grill/py/source/main.h
@@ -25,7 +25,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#error PD version >= 0.37 required, please upgrade!
#endif
-#define PY__VERSION "0.2.0pre"
+#define PY__VERSION "0.2.0"
#define PYEXT_MODULE "pyext" // name for module
@@ -200,19 +200,19 @@ public:
// (recursive calls can only happen in the system thread)
static int lockcount;
- inline PyThreadState *PyLock(PyThreadState *st = FindThreadState())
+ static PyThreadState *PyLock(PyThreadState *st = FindThreadState())
{
if(!IsSystemThread() || !lockcount++) PyEval_AcquireLock();
return PyThreadState_Swap(st);
}
- inline PyThreadState *PyLockSys()
+ static PyThreadState *PyLockSys()
{
if(!lockcount++) PyEval_AcquireLock();
return PyThreadState_Swap(pythrsys);
}
- inline void PyUnlock(PyThreadState *st)
+ static void PyUnlock(PyThreadState *st)
{
PyThreadState *old = PyThreadState_Swap(st);
if(old != pythrsys || !--lockcount) PyEval_ReleaseLock();
@@ -222,9 +222,9 @@ public:
inline void Lock() {}
inline void Unlock() {}
- inline PyThreadState *PyLock(PyThreadState * = NULL) { return NULL; }
- inline PyThreadState *PyLockSys() { return NULL; }
- inline void PyUnlock(PyThreadState *st) {}
+ static PyThreadState *PyLock(PyThreadState * = NULL) { return NULL; }
+ static PyThreadState *PyLockSys() { return NULL; }
+ static void PyUnlock(PyThreadState *st) {}
#endif
static PyObject* StdOut_Write(PyObject* Self, PyObject* Args);