// Locale support -*- C++ -*-
-// Copyright (C) 2000, 2009, 2010 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
// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
// functions go in ctype.cc
-_GLIBCXX_BEGIN_NAMESPACE(std)
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
bool
ctype<char>::
is(mask __m, char __c) const
- { return __OBJ_DATA(__lc_ctype)->mask[__c] & __m; }
+ {
+ if(_M_table)
+ return _M_table[static_cast<unsigned char>(__c)] & __m;
+ else
+#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*
ctype<char>::
is(const char* __low, const char* __high, mask* __vec) const
{
- while (__low < __high)
- *__vec++ = __OBJ_DATA(__lc_ctype)->mask[*__low++];
+ if(_M_table)
+ while (__low < __high)
+ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
+ else
+ while (__low < __high)
+#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;
}
return __low;
}
-_GLIBCXX_END_NAMESPACE
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace