diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2004-06-22 22:45:53 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2004-06-22 22:45:53 +0000 |
commit | 28ba959cb77eabe61f8f58ac013b72e5d5d391d7 (patch) | |
tree | e9820d0754c9036cf3912be24131d3bc15dc36e7 /externals/grill/py/source | |
parent | a5b1fb9db8d71b9132c31fa238cf22af0267a248 (diff) |
""
svn path=/trunk/; revision=1829
Diffstat (limited to 'externals/grill/py/source')
-rw-r--r-- | externals/grill/py/source/main.cpp | 2 | ||||
-rw-r--r-- | externals/grill/py/source/main.h | 4 | ||||
-rw-r--r-- | externals/grill/py/source/pyext.cpp | 4 |
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; } |