mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Remove CEF-specific integer and char16 typedef's (see #3507)
This commit is contained in:
@@ -37,50 +37,4 @@
|
||||
|
||||
#include "include/base/cef_build.h"
|
||||
|
||||
// The NSPR system headers define 64-bit as |long| when possible, except on
|
||||
// Mac OS X. In order to not have typedef mismatches, we do the same on LP64.
|
||||
//
|
||||
// On Mac OS X, |long long| is used for 64-bit types for compatibility with
|
||||
// <inttypes.h> format macros even in the LP64 model.
|
||||
#if defined(__LP64__) && !defined(OS_MAC) && !defined(OS_OPENBSD)
|
||||
typedef long int64;
|
||||
typedef unsigned long uint64;
|
||||
#else
|
||||
typedef long long int64;
|
||||
typedef unsigned long long uint64;
|
||||
#endif
|
||||
|
||||
// TODO: Remove these type guards. These are to avoid conflicts with
|
||||
// obsolete/protypes.h in the Gecko SDK.
|
||||
#ifndef _INT32
|
||||
#define _INT32
|
||||
typedef int int32;
|
||||
#endif
|
||||
|
||||
// TODO: Remove these type guards. These are to avoid conflicts with
|
||||
// obsolete/protypes.h in the Gecko SDK.
|
||||
#ifndef _UINT32
|
||||
#define _UINT32
|
||||
typedef unsigned int uint32;
|
||||
#endif
|
||||
|
||||
#ifndef _INT16
|
||||
#define _INT16
|
||||
typedef short int16;
|
||||
#endif
|
||||
|
||||
#ifndef _UINT16
|
||||
#define _UINT16
|
||||
typedef unsigned short uint16;
|
||||
#endif
|
||||
|
||||
// UTF-16 character type.
|
||||
#ifndef char16
|
||||
#if defined(WCHAR_T_IS_UTF16)
|
||||
typedef wchar_t char16;
|
||||
#elif defined(WCHAR_T_IS_UTF32)
|
||||
typedef unsigned short char16;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // CEF_INCLUDE_BASE_CEF_BASICTYPES_H_
|
||||
|
@@ -253,7 +253,7 @@
|
||||
// The compiler thinks std::string::const_iterator and "const char*" are
|
||||
// equivalent types.
|
||||
#define STD_STRING_ITERATOR_IS_CHAR_POINTER
|
||||
// The compiler thinks std::u16string::const_iterator and "char16*" are
|
||||
// The compiler thinks std::u16string::const_iterator and "char16_t*" are
|
||||
// equivalent types.
|
||||
#define BASE_STRING16_ITERATOR_IS_CHAR16_POINTER
|
||||
#endif
|
||||
|
@@ -723,6 +723,13 @@ std::ostream& operator<<(std::ostream& out, const wchar_t* wstr);
|
||||
inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) {
|
||||
return out << wstr.c_str();
|
||||
}
|
||||
#if defined(WCHAR_T_IS_UTF32)
|
||||
std::ostream& operator<<(std::ostream& out, const char16_t* wstr);
|
||||
#elif defined(WCHAR_T_IS_UTF16)
|
||||
inline std::ostream& operator<<(std::ostream& out, const char16_t* wstr) {
|
||||
return operator<<(out, reinterpret_cast<const wchar_t*>(wstr));
|
||||
}
|
||||
#endif
|
||||
|
||||
// The NOTIMPLEMENTED() macro annotates codepaths which have
|
||||
// not been implemented yet.
|
||||
|
Reference in New Issue
Block a user