Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(677)

Side by Side Diff: ppapi/c/pp_macros.h

Issue 8885012: Replace PP_ALLOW_THIS_IN_INITIALIZER_LIST macro (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revise Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/api/pp_macros.idl ('k') | ppapi/tests/test_flash.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2011 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 Sat Jul 16 16:50:26 2011. */ 6 /* From pp_macros.idl modified Thu Dec 8 23:25:05 2011. */
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
11 11
12 /** 12 /**
13 * @file 13 * @file
14 * Defines the API ... 14 * Defines the API ...
15 */ 15 */
16 16
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 /* PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES is for typenames that contain 'enum' 87 /* PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES is for typenames that contain 'enum'
88 in C. That is, enum names that are not typedefs. 88 in C. That is, enum names that are not typedefs.
89 E.g.: 89 E.g.:
90 enum Bar { A = 0, B = 1 }; 90 enum Bar { A = 0, B = 1 };
91 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(Foo, 4); 91 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(Foo, 4);
92 */ 92 */
93 #define PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(NAME, SIZE) \ 93 #define PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(NAME, SIZE) \
94 PP_COMPILE_ASSERT_SIZE_IN_BYTES_IMPL(NAME, enum NAME, SIZE) 94 PP_COMPILE_ASSERT_SIZE_IN_BYTES_IMPL(NAME, enum NAME, SIZE)
95 95
96 /* This is roughly copied from base/compiler_specific.h, and makes it possible
97 to pass 'this' in a constructor initializer list, when you really mean it.
98 E.g.:
99 Foo::Foo(MyInstance* instance)
100 : PP_ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)) {}
101 */
102 #if defined(COMPILER_MSVC)
103 # define PP_ALLOW_THIS_IN_INITIALIZER_LIST(code) \
104 __pragma(warning(push)) \
105 __pragma(warning(disable:4355)) \
106 code \
107 __pragma(warning(pop))
108 #else
109 # define PP_ALLOW_THIS_IN_INITIALIZER_LIST(code) code
110 #endif
111
96 /** 112 /**
97 * @} 113 * @}
98 * End of addtogroup PP 114 * End of addtogroup PP
99 */ 115 */
100 116
101 #endif /* PPAPI_C_PP_MACROS_H_ */ 117 #endif /* PPAPI_C_PP_MACROS_H_ */
102 118
OLDNEW
« no previous file with comments | « ppapi/api/pp_macros.idl ('k') | ppapi/tests/test_flash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698