mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-23 23:47:43 +01:00
Fix duplicate/incorrect type defines (issue #1683)
This commit is contained in:
parent
2d0c79ec29
commit
85e11f95a4
@ -72,15 +72,16 @@ typedef int int32;
|
|||||||
typedef unsigned int uint32;
|
typedef unsigned int uint32;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// UTF-16 character type
|
#endif // !BUILDING_CEF_SHARED
|
||||||
|
|
||||||
|
// UTF-16 character type.
|
||||||
|
// This should be kept synchronized with base/strings/string16.h
|
||||||
#ifndef char16
|
#ifndef char16
|
||||||
#if defined(WIN32)
|
#if defined(WCHAR_T_IS_UTF16)
|
||||||
typedef wchar_t char16;
|
typedef wchar_t char16;
|
||||||
#else
|
#elif defined(WCHAR_T_IS_UTF32)
|
||||||
typedef unsigned short char16;
|
typedef unsigned short char16;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // !BUILDING_CEF_SHARED
|
|
||||||
|
|
||||||
#endif // CEF_INCLUDE_BASE_CEF_BASICTYPES_H_
|
#endif // CEF_INCLUDE_BASE_CEF_BASICTYPES_H_
|
||||||
|
@ -38,26 +38,13 @@
|
|||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#include "include/base/cef_build.h"
|
#include "include/base/cef_basictypes.h"
|
||||||
#include "include/internal/cef_export.h"
|
#include "include/internal/cef_export.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// CEF character type definitions. wchar_t is 2 bytes on Windows and 4 bytes on
|
|
||||||
// most other platforms.
|
|
||||||
|
|
||||||
#if defined(OS_WIN)
|
|
||||||
typedef wchar_t char16;
|
|
||||||
#else // !OS_WIN
|
|
||||||
typedef unsigned short char16; // NOLINT (runtime/int)
|
|
||||||
#ifndef WCHAR_T_IS_UTF32
|
|
||||||
#define WCHAR_T_IS_UTF32
|
|
||||||
#endif // WCHAR_T_IS_UTF32
|
|
||||||
#endif // !OS_WIN
|
|
||||||
|
|
||||||
|
|
||||||
// CEF string type definitions. Whomever allocates |str| is responsible for
|
// CEF string type definitions. Whomever allocates |str| is responsible for
|
||||||
// providing an appropriate |dtor| implementation that will free the string in
|
// providing an appropriate |dtor| implementation that will free the string in
|
||||||
// the same memory space. When reusing an existing string structure make sure
|
// the same memory space. When reusing an existing string structure make sure
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_H_
|
#define CEF_INCLUDE_INTERNAL_CEF_TYPES_H_
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "include/base/cef_build.h"
|
#include "include/base/cef_basictypes.h"
|
||||||
#include "include/internal/cef_string.h"
|
#include "include/internal/cef_string.h"
|
||||||
#include "include/internal/cef_string_list.h"
|
#include "include/internal/cef_string_list.h"
|
||||||
#include "include/internal/cef_time.h"
|
#include "include/internal/cef_time.h"
|
||||||
@ -46,45 +46,6 @@
|
|||||||
#include "include/internal/cef_types_linux.h"
|
#include "include/internal/cef_types_linux.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <limits.h> // For UINT_MAX
|
|
||||||
#include <stddef.h> // For size_t
|
|
||||||
|
|
||||||
// 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_MACOSX) && !defined(OS_OPENBSD)
|
|
||||||
typedef long int64; // NOLINT(runtime/int)
|
|
||||||
typedef unsigned long uint64; // NOLINT(runtime/int)
|
|
||||||
#else
|
|
||||||
typedef long long int64; // NOLINT(runtime/int)
|
|
||||||
typedef unsigned long long uint64; // NOLINT(runtime/int)
|
|
||||||
#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
|
|
||||||
|
|
||||||
// UTF-16 character type
|
|
||||||
#ifndef char16
|
|
||||||
#if defined(WIN32)
|
|
||||||
typedef wchar_t char16;
|
|
||||||
#else
|
|
||||||
typedef unsigned short char16;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// 32-bit ARGB color value, not premultiplied. The color components are always
|
// 32-bit ARGB color value, not premultiplied. The color components are always
|
||||||
// in a known order. Equivalent to the SkColor type.
|
// in a known order. Equivalent to the SkColor type.
|
||||||
typedef uint32 cef_color_t;
|
typedef uint32 cef_color_t;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user