From 3118cea037b63661e5f7ebff0c1a810da7f6159b Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Tue, 6 Dec 2005 21:54:32 +0000 Subject: fixes for pthreads version 2 fixes for pthreads V2 svn path=/trunk/; revision=4156 --- externals/grill/py/py.vcproj | 6 +++--- externals/grill/py/source/pybase.cpp | 14 +++++++++++++- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'externals/grill/py') 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 @@ 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 PyThrMap; static PyInterpreterState *pymain = NULL; static PyThrMap pythrmap; -- cgit v1.2.1