[pypy-commit] cffi windows-tls: fix
arigo
pypy.commits at gmail.com
Sun Jan 3 07:27:50 EST 2016
Author: Armin Rigo <arigo at tunes.org>
Branch: windows-tls
Changeset: r2523:19533a7c52c5
Date: 2016-01-03 13:27 +0100
http://bitbucket.org/cffi/cffi/changeset/19533a7c52c5/
Log: fix
diff --git a/c/misc_win32.h b/c/misc_win32.h
--- a/c/misc_win32.h
+++ b/c/misc_win32.h
@@ -20,14 +20,16 @@
DWORD reason_for_call,
LPVOID reserved)
{
- LPVOID tls;
+ LPVOID p;
+ struct cffi_errno_s *tls;
switch (reason_for_call) {
case DLL_THREAD_DETACH:
if (cffi_tls_index != TLS_OUT_OF_INDEXES) {
- tls = TlsGetValue(cffi_tls_index);
- if (tls != NULL) {
+ p = TlsGetValue(cffi_tls_index);
+ if (p != NULL) {
+ tls = (struct cffi_errno_s *)p;
fprintf(stderr, "thread shutting down! %p\n",
tls->local_thread_state);
TlsSetValue(cffi_tls_index, NULL);
More information about the pypy-commit
mailing list