| OLD | NEW |
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 | 5 |
| 6 /* From pp_macros.idl modified Tue May 20 17:13:23 2014. */ | 6 /* From pp_macros.idl modified Tue May 20 17:13:23 2014. */ |
| 7 | 7 |
| 8 #ifndef PPAPI_C_PP_MACROS_H_ | 8 #ifndef PPAPI_C_PP_MACROS_H_ |
| 9 #define PPAPI_C_PP_MACROS_H_ | 9 #define PPAPI_C_PP_MACROS_H_ |
| 10 | 10 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 /* PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES is for typenames that contain 'enum' | 89 /* PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES is for typenames that contain 'enum' |
| 90 in C. That is, enum names that are not typedefs. | 90 in C. That is, enum names that are not typedefs. |
| 91 E.g.: | 91 E.g.: |
| 92 enum Bar { A = 0, B = 1 }; | 92 enum Bar { A = 0, B = 1 }; |
| 93 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(Foo, 4); | 93 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(Foo, 4); |
| 94 */ | 94 */ |
| 95 #define PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(NAME, SIZE) \ | 95 #define PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(NAME, SIZE) \ |
| 96 PP_COMPILE_ASSERT_SIZE_IN_BYTES_IMPL(NAME, enum NAME, SIZE) | 96 PP_COMPILE_ASSERT_SIZE_IN_BYTES_IMPL(NAME, enum NAME, SIZE) |
| 97 | 97 |
| 98 /* This is roughly copied from base/compiler_specific.h, and makes it possible | |
| 99 to pass 'this' in a constructor initializer list, when you really mean it. | |
| 100 E.g.: | |
| 101 Foo::Foo(MyInstance* instance) | |
| 102 : PP_ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)) {} | |
| 103 */ | |
| 104 #if defined(_MSC_VER) | |
| 105 # define PP_ALLOW_THIS_IN_INITIALIZER_LIST(code) \ | |
| 106 __pragma(warning(push)) \ | |
| 107 __pragma(warning(disable:4355)) \ | |
| 108 code \ | |
| 109 __pragma(warning(pop)) | |
| 110 #else | |
| 111 # define PP_ALLOW_THIS_IN_INITIALIZER_LIST(code) code | |
| 112 #endif | |
| 113 | |
| 114 /** | 98 /** |
| 115 * @} | 99 * @} |
| 116 * End of addtogroup PP | 100 * End of addtogroup PP |
| 117 */ | 101 */ |
| 118 | 102 |
| 119 #endif /* PPAPI_C_PP_MACROS_H_ */ | 103 #endif /* PPAPI_C_PP_MACROS_H_ */ |
| 120 | 104 |
| OLD | NEW |