aboutsummaryrefslogtreecommitdiffstats
path: root/thread_win32.h
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2022-05-24 04:54:26 +0900
committerKoichi Sasada <ko1@atdot.net>2022-05-24 10:06:51 +0900
commit741ac503309f32b5c39073f46a205c99a31d4b0e (patch)
tree907d6202cd218365df1049766303bd8e218e57de /thread_win32.h
parent9c9c217045179869faf6caa7271bcb2e7c2e252c (diff)
downloadruby-741ac503309f32b5c39073f46a205c99a31d4b0e.tar.gz
`native_tls_get()`' should not check results
caller should check the result of `native_tls_get()`.
Diffstat (limited to 'thread_win32.h')
-rw-r--r--thread_win32.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/thread_win32.h b/thread_win32.h
index 12aef02728..f00f3b2056 100644
--- a/thread_win32.h
+++ b/thread_win32.h
@@ -44,11 +44,8 @@ typedef DWORD native_tls_key_t; // TLS index
static inline void *
native_tls_get(native_tls_key_t key)
{
- void *ptr = TlsGetValue(key);
- if (UNLIKELY(ptr == NULL)) {
- rb_bug("TlsGetValue() returns NULL");
- }
- return ptr;
+ // return value should be checked by caller.
+ return TlsGetValue(key);
}
static inline void