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

Side by Side Diff: ppapi/api/pp_macros.idl

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 | « no previous file | ppapi/c/pp_macros.h » ('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 /** 6 /**
7 * Defines the API ... 7 * Defines the API ...
8 */ 8 */
9 9
10 #inline c 10 #inline c
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 /* PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES is for typenames that contain 'enum' 80 /* PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES is for typenames that contain 'enum'
81 in C. That is, enum names that are not typedefs. 81 in C. That is, enum names that are not typedefs.
82 E.g.: 82 E.g.:
83 enum Bar { A = 0, B = 1 }; 83 enum Bar { A = 0, B = 1 };
84 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(Foo, 4); 84 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(Foo, 4);
85 */ 85 */
86 #define PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(NAME, SIZE) \ 86 #define PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(NAME, SIZE) \
87 PP_COMPILE_ASSERT_SIZE_IN_BYTES_IMPL(NAME, enum NAME, SIZE) 87 PP_COMPILE_ASSERT_SIZE_IN_BYTES_IMPL(NAME, enum NAME, SIZE)
88 88
89 /* This is roughly copied from base/compiler_specific.h, and makes it possible
90 to pass 'this' in a constructor initializer list, when you really mean it.
91 E.g.:
92 Foo::Foo(MyInstance* instance)
93 : PP_ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)) {}
94 */
95 #if defined(COMPILER_MSVC)
96 # define PP_ALLOW_THIS_IN_INITIALIZER_LIST(code) \
97 __pragma(warning(push)) \
98 __pragma(warning(disable:4355)) \
99 code \
100 __pragma(warning(pop))
101 #else
102 # define PP_ALLOW_THIS_IN_INITIALIZER_LIST(code) code
103 #endif
104
89 /** 105 /**
90 * @} 106 * @}
91 * End of addtogroup PP 107 * End of addtogroup PP
92 */ 108 */
93 109
94 #endinl 110 #endinl
95 111
OLDNEW
« no previous file with comments | « no previous file | ppapi/c/pp_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698