diff options
author | dmichael@google.com <dmichael@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-05 14:45:44 +0000 |
---|---|---|
committer | dmichael@google.com <dmichael@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-05 14:45:44 +0000 |
commit | 6f2e3919c4709404d8d7b6742f9cd9989b799c98 (patch) | |
tree | 55a933f7e2988625f0f3ded5a562203c7e3921c9 /ppapi/c/pp_bool.h | |
parent | 79ba2d8a26fe6c9b343c57fef57896a90baa3878 (diff) | |
download | chromium_src-6f2e3919c4709404d8d7b6742f9cd9989b799c98.zip chromium_src-6f2e3919c4709404d8d7b6742f9cd9989b799c98.tar.gz chromium_src-6f2e3919c4709404d8d7b6742f9cd9989b799c98.tar.bz2 |
Make PPAPI headers compile with C compilers (gcc on Linux & Mac and MSVS on Windows). This includes changing bool to PP_Bool and adding a PP_INLINE macro.
TEST=tests/test_c_includes.c
BUG=59791,53451
The first patch set is a straight copy of http://codereview.chromium.org/4019010/show which got LGTMed when PPAPI was in its own repo, but had to be rolled back in order to include chrome changes.
IMPORTANT: This change will break plugin implementations that use the C interface, and might break others as well.
Review URL: http://codereview.chromium.org/4310002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65200 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c/pp_bool.h')
-rw-r--r-- | ppapi/c/pp_bool.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ppapi/c/pp_bool.h b/ppapi/c/pp_bool.h new file mode 100644 index 0000000..44c360e --- /dev/null +++ b/ppapi/c/pp_bool.h @@ -0,0 +1,32 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef PPAPI_C_PP_BOOL_H_ +#define PPAPI_C_PP_BOOL_H_ + +/** + * @file + * Defines the API ... + * + * @addtogroup PP + * @{ + */ + +/** + * A boolean value for use in PPAPI C headers. The standard bool type is not + * available to pre-C99 compilers, and is not guaranteed to be compatible + * between C and C++, whereas the PPAPI C headers can be included from C or C++ + * code. + */ +typedef enum { + PP_FALSE = 0, + PP_TRUE = 1 +} PP_Bool; +/** + * @} + * End addtogroup PP + */ + +#endif // PPAPI_C_PP_BOOL_H_ + |