aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/py/source
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/py/source')
-rw-r--r--externals/grill/py/source/main.cpp2
-rw-r--r--externals/grill/py/source/main.h4
-rw-r--r--externals/grill/py/source/pyext.cpp4
3 files changed, 6 insertions, 4 deletions
diff --git a/externals/grill/py/source/main.cpp b/externals/grill/py/source/main.cpp
index 0434f682..034fefd2 100644
--- a/externals/grill/py/source/main.cpp
+++ b/externals/grill/py/source/main.cpp
@@ -153,7 +153,7 @@ V py::m__doc(PyObject *obj)
// -> split into separate lines
for(;;) {
char buf[1024];
- char *nl = strchr(s,'\n');
+ char *nl = strchr((char *)s,'\n'); // the cast is for Borland C++
if(!nl) {
// no more newline found
post(s);
diff --git a/externals/grill/py/source/main.h b/externals/grill/py/source/main.h
index 2e8419d3..0bbb92d3 100644
--- a/externals/grill/py/source/main.h
+++ b/externals/grill/py/source/main.h
@@ -29,7 +29,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#error You need at least flext version 0.4.6
#endif
-#define PY__VERSION "0.1.3pre"
+#define PY__VERSION "0.1.3"
#define PYEXT_MODULE "pyext" // name for module
@@ -50,7 +50,9 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include "main.h"
+#ifdef FLEXT_THREADS
typedef std::map<flext::thrid_t,PyThreadState *> PyThrMap;
+#endif
class py:
public flext_base
diff --git a/externals/grill/py/source/pyext.cpp b/externals/grill/py/source/pyext.cpp
index 66428054..df47beff 100644
--- a/externals/grill/py/source/pyext.cpp
+++ b/externals/grill/py/source/pyext.cpp
@@ -453,6 +453,7 @@ V pyext::work_wrapper(V *data)
else
#endif
{
+#ifdef FLEXT_THREADS
// --- make new Python thread ---
// get the global lock
PyEval_AcquireLock();
@@ -463,7 +464,6 @@ V pyext::work_wrapper(V *data)
// -----------------------------
// store new thread state
-#ifdef FLEXT_THREADS
pythrmap[GetThreadId()] = newthr;
#endif
{
@@ -476,7 +476,6 @@ V pyext::work_wrapper(V *data)
#ifdef FLEXT_THREADS
// delete mapped thread state
pythrmap.erase(GetThreadId());
-#endif
// --- delete Python thread ---
// grab the lock
@@ -490,6 +489,7 @@ V pyext::work_wrapper(V *data)
// release the lock
PyEval_ReleaseLock();
// -----------------------------
+#endif
}
--thrcount;
}