// Locale support -*- C++ -*-
-// Copyright (C) 2000-2020 Free Software Foundation, Inc.
+// Copyright (C) 2000-2024 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
if(_M_table)
return _M_table[static_cast<unsigned char>(__c)] & __m;
else
- return __OBJ_DATA(__lc_ctype)->mask[__c] & __m;
+#ifdef _THREAD_SAFE
+ return __OBJ_DATA((*__lc_ctype_ptr))->mask[static_cast<unsigned char>(__c)] & __m;
+#else
+ return __OBJ_DATA(__lc_ctype)->mask[static_cast<unsigned char>(__c)] & __m;
+#endif
}
const char*
*__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
else
while (__low < __high)
- *__vec++ = __OBJ_DATA(__lc_ctype)->mask[*__low++];
+#ifdef _THREAD_SAFE
+ *__vec++ = __OBJ_DATA((*__lc_ctype_ptr))->mask[static_cast<unsigned char>(*__low++)];
+#else
+ *__vec++ = __OBJ_DATA(__lc_ctype)->mask[static_cast<unsigned char>(*__low++)];
+#endif
return __high;
}