aboutsummaryrefslogtreecommitdiff
path: root/externals
diff options
context:
space:
mode:
Diffstat (limited to 'externals')
-rw-r--r--externals/grill/py/py.vcproj6
-rw-r--r--externals/grill/py/source/pybase.cpp14
2 files changed, 16 insertions, 4 deletions
diff --git a/externals/grill/py/py.vcproj b/externals/grill/py/py.vcproj
index 5ad7f1bf..50d989c8 100644
--- a/externals/grill/py/py.vcproj
+++ b/externals/grill/py/py.vcproj
@@ -85,7 +85,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="c:\programme\audio\pd-0.39-1\src;..\flext\source;c:\programme\prog\Python24\include"
+ AdditionalIncludeDirectories="C:\data\prog\packs\pthreads\include;c:\programme\audio\pd\src;..\flext\source;c:\programme\prog\Python24\include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PY_EXPORTS;FLEXT_SYS=2;FLEXT_THREADS;PY_NUMARRAY"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@@ -101,11 +101,11 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="pd.lib pthreadVC.lib"
+ AdditionalDependencies="pd.lib pthreadVC2.lib"
OutputFile="$(outdir)/py.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
- AdditionalLibraryDirectories="&quot;C:\data\prog\packs\Python-2.4\PCbuild&quot;;&quot;c:/programme/audio/pd-0.39-1/bin&quot;"
+ AdditionalLibraryDirectories="&quot;C:\data\prog\packs\Python-2.4\PCbuild&quot;;C:\data\prog\packs\pthreads\lib;c:/programme/audio/pd/bin"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(outdir)/py.pdb"
SubSystem="2"
diff --git a/externals/grill/py/source/pybase.cpp b/externals/grill/py/source/pybase.cpp
index e68d9929..bdc76099 100644
--- a/externals/grill/py/source/pybase.cpp
+++ b/externals/grill/py/source/pybase.cpp
@@ -27,7 +27,19 @@ static PyObject *gcollect = NULL;
#ifdef FLEXT_THREADS
-typedef std::map<flext::thrid_t,PyThreadState *> PyThrMap;
+class ThrCmp
+{
+public:
+ inline bool operator()(const flext::thrid_t &a,const flext::thrid_t &b) const
+ {
+ if(sizeof(a) == sizeof(size_t))
+ return *(size_t *)&a < *(size_t *)&b;
+ else
+ return memcmp(&a,&b,sizeof(a)) < 0;
+ }
+};
+
+typedef std::map<flext::thrid_t,PyThreadState *,ThrCmp> PyThrMap;
static PyInterpreterState *pymain = NULL;
static PyThrMap pythrmap;