aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/py/source/pybase.h
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2005-08-11 15:00:58 +0000
committerThomas Grill <xovo@users.sourceforge.net>2005-08-11 15:00:58 +0000
commit214bb7279f354adf1344376e26465046fc2581ce (patch)
tree0e0f32a27f274e4d6a09352146c7507472313dc5 /externals/grill/py/source/pybase.h
parente1be380510a42f13ce1fd55a29705aaf9e8c8da8 (diff)
oops, include libraries for editing the scripts
some optimizations and py reload fix open editor for module file on "edit" message (or click) open editor for script under OS X added cygwin support svn path=/trunk/; revision=3417
Diffstat (limited to 'externals/grill/py/source/pybase.h')
-rw-r--r--externals/grill/py/source/pybase.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/externals/grill/py/source/pybase.h b/externals/grill/py/source/pybase.h
index f0ec5640..49eccbbc 100644
--- a/externals/grill/py/source/pybase.h
+++ b/externals/grill/py/source/pybase.h
@@ -53,7 +53,6 @@ protected:
void AddCurrentPath(flext_base *o);
void GetModulePath(const char *mod,char *dir,int len);
- void AddToPath(const char *dir);
void SetArgs();
bool OutObject(flext_base *ext,int o,PyObject *obj);
@@ -148,7 +147,6 @@ protected:
return true;
}
-// virtual bool thrcall(void *data) = 0;
virtual void callpy(PyObject *fun,PyObject *args) = 0;
void exchandle();
@@ -168,11 +166,6 @@ protected:
static PyFifo qufifo;
static ThrCond qucond;
static PyThreadState *pythrsys;
-
- static PyThreadState *FindThreadState();
- static void FreeThreadState();
-#else
- static PyThreadState *FindThreadState() { return NULL; }
#endif
static const t_symbol *sym_fint; // float or int symbol, depending on native number message type
@@ -182,10 +175,11 @@ protected:
public:
+ static void AddToPath(const char *dir);
+
#ifdef FLEXT_THREADS
- ThrMutex mutex;
- inline void Lock() { mutex.Unlock(); }
- inline void Unlock() { mutex.Unlock(); }
+ static PyThreadState *FindThreadState();
+ static void FreeThreadState();
// this is especially needed when one py/pyext object calls another one
// we don't want the message to be queued, but otoh we have to avoid deadlock
@@ -209,11 +203,7 @@ public:
PyThreadState *old = PyThreadState_Swap(st);
if(old != pythrsys || !--lockcount) PyEval_ReleaseLock();
}
-
#else
- inline void Lock() {}
- inline void Unlock() {}
-
static PyThreadState *PyLock(PyThreadState * = NULL) { return NULL; }
static PyThreadState *PyLockSys() { return NULL; }
static void PyUnlock(PyThreadState *st) {}