void __wxCleanup() {
wxEntryCleanup();
+#ifdef WXP_WITH_THREAD
delete wxPyTMutex;
wxPyTMutex = NULL;
wxPyTStates->Empty();
delete wxPyTStates;
wxPyTStates = NULL;
+#endif
}
//---------------------------------------------------------------------------
-// TODO: This should really be wxThread::GetCurrentId(), and I will do so
-// after I make a quick 2.3.2.1 release.
+
#ifdef WXP_WITH_THREAD
-#ifdef __WXGTK__ // does wxGTK always use pthreads?
-#include <unistd.h>
-#include <pthread.h>
-#endif
inline
unsigned long wxPyGetCurrentThreadId() {
-#ifdef __WXMSW__
- return (unsigned long)::GetCurrentThreadId();
-#endif
-#ifdef __WXGTK__ // does wxGTK always use pthreads?
- return (unsigned long)pthread_self();
-#endif
-#ifdef __WXMAC__
- ThreadID current ;
- MacGetCurrentThread( ¤t ) ;
- return (unsigned long)current;
-#endif
+ return wxThread::GetCurrentId();
}
-
static
PyThreadState* wxPyGetThreadState() {
unsigned long ctid = wxPyGetCurrentThreadId();
}
+PyObject* wxArrayInt2PyList_helper(const wxArrayInt& arr) {
+
+ PyObject* list = PyList_New(0);
+ for (size_t i=0; i < arr.GetCount(); i++) {
+ PyObject* number = PyInt_FromLong(arr[i]);
+ PyList_Append(list, number);
+ Py_DECREF(number);
+ }
+ return list;
+}
+
+
//----------------------------------------------------------------------
//----------------------------------------------------------------------