]> git.saurik.com Git - wxWidgets.git/commitdiff
Correct wxTLS_PTR definition for !wxHAS_COMPILER_TLS case.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 27 Nov 2011 19:50:01 +0000 (19:50 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 27 Nov 2011 19:50:01 +0000 (19:50 +0000)
wxTLS_PTR should have type of "T*" instead of being simply usable as "T*"
because of its overloaded operator->(), otherwise the code relying on it being
"T*" and compiling without problems in wxHAS_COMPILER_TLS case could fail to
compile without compiler TLS support.

Closes #13644.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/tls.h

index f91368d503672fc04661f85d2aeb5befa75e1bee..996fa251ddec1f2877e0108bf28662dc4a675dff 100644 (file)
     };
 
     #define wxTLS_TYPE(T) wxTlsValue<T>
-    #define wxTLS_PTR(var) (var)
+    #define wxTLS_PTR(var) ((var).Get())
     #define wxTLS_VALUE(var) (*(var))
 #endif // wxHAS_COMPILER_TLS/!wxHAS_COMPILER_TLS