74 lines
2.0 KiB
Diff
74 lines
2.0 KiB
Diff
--- Python-3.3.2-orig/Include/pythread.h 2013-05-15 20:32:54.000000000 +0400
|
|
+++ Python-3.3.2/Include/pythread.h 2013-08-02 00:44:41.784179600 +0400
|
|
@@ -77,11 +77,11 @@
|
|
PyAPI_FUNC(PyObject*) PyThread_GetInfo(void);
|
|
|
|
/* Thread Local Storage (TLS) API */
|
|
-PyAPI_FUNC(int) PyThread_create_key(void);
|
|
-PyAPI_FUNC(void) PyThread_delete_key(int);
|
|
-PyAPI_FUNC(int) PyThread_set_key_value(int, void *);
|
|
-PyAPI_FUNC(void *) PyThread_get_key_value(int);
|
|
-PyAPI_FUNC(void) PyThread_delete_key_value(int key);
|
|
+PyAPI_FUNC(long) PyThread_create_key(void);
|
|
+PyAPI_FUNC(void) PyThread_delete_key(long);
|
|
+PyAPI_FUNC(int) PyThread_set_key_value(long, void *);
|
|
+PyAPI_FUNC(void *) PyThread_get_key_value(long);
|
|
+PyAPI_FUNC(void) PyThread_delete_key_value(long key);
|
|
|
|
/* Cleanup after a fork */
|
|
PyAPI_FUNC(void) PyThread_ReInitTLS(void);
|
|
--- Python-3.3.2-orig/Python/pystate.c 2013-05-15 20:33:00.000000000 +0400
|
|
+++ Python-3.3.2/Python/pystate.c 2013-08-02 00:46:14.940429600 +0400
|
|
@@ -37,7 +37,7 @@
|
|
GILState implementation
|
|
*/
|
|
static PyInterpreterState *autoInterpreterState = NULL;
|
|
-static int autoTLSkey = 0;
|
|
+static long autoTLSkey = 0;
|
|
#else
|
|
#define HEAD_INIT() /* Nothing */
|
|
#define HEAD_LOCK() /* Nothing */
|
|
--- Python-3.3.2-orig/Python/thread_pthread.h 2013-05-15 20:33:00.000000000 +0400
|
|
+++ Python-3.3.2/Python/thread_pthread.h 2013-08-02 00:47:54.674804600 +0400
|
|
@@ -600,7 +600,7 @@
|
|
|
|
#define Py_HAVE_NATIVE_TLS
|
|
|
|
-int
|
|
+long
|
|
PyThread_create_key(void)
|
|
{
|
|
pthread_key_t key;
|
|
@@ -609,19 +609,19 @@
|
|
}
|
|
|
|
void
|
|
-PyThread_delete_key(int key)
|
|
+PyThread_delete_key(long key)
|
|
{
|
|
pthread_key_delete(key);
|
|
}
|
|
|
|
void
|
|
-PyThread_delete_key_value(int key)
|
|
+PyThread_delete_key_value(long key)
|
|
{
|
|
pthread_setspecific(key, NULL);
|
|
}
|
|
|
|
int
|
|
-PyThread_set_key_value(int key, void *value)
|
|
+PyThread_set_key_value(long key, void *value)
|
|
{
|
|
int fail;
|
|
void *oldValue = pthread_getspecific(key);
|
|
@@ -632,7 +632,7 @@
|
|
}
|
|
|
|
void *
|
|
-PyThread_get_key_value(int key)
|
|
+PyThread_get_key_value(long key)
|
|
{
|
|
return pthread_getspecific(key);
|
|
}
|