[pypy-commit] pypy stmgc-c7-rewindjmp: Silence C warnings
arigo
noreply at buildbot.pypy.org
Mon Aug 18 17:04:23 CEST 2014
Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c7-rewindjmp
Changeset: r72891:c872c9937900
Date: 2014-08-18 17:03 +0200
http://bitbucket.org/pypy/pypy/changeset/c872c9937900/
Log: Silence C warnings
diff --git a/rpython/translator/c/src/threadlocal.h b/rpython/translator/c/src/threadlocal.h
--- a/rpython/translator/c/src/threadlocal.h
+++ b/rpython/translator/c/src/threadlocal.h
@@ -24,10 +24,15 @@
#ifdef USE___THREAD
-#define RPyThreadStaticTLS __thread long
+#ifdef RPY_STM
+# define RPY_THREAD_LOCAL_TYPE pypy_object0_t *
+#else
+# define RPY_THREAD_LOCAL_TYPE void *
+#endif
+#define RPyThreadStaticTLS __thread RPY_THREAD_LOCAL_TYPE
#define RPyThreadStaticTLS_Create(tls) (void)0
#define RPyThreadStaticTLS_Get(tls) tls
-#define RPyThreadStaticTLS_Set(tls, value) tls = (long)value
+#define RPyThreadStaticTLS_Set(tls, value) tls = (RPY_THREAD_LOCAL_TYPE)value
#define OP_THREADLOCALREF_GETADDR(tlref, ptr) ptr = tlref
#endif
More information about the pypy-commit
mailing list