Commit 3626a48a authored by rnk@chromium.org's avatar rnk@chromium.org

Use L###macro_arg instead of L#macro_arg to make a wide string literal

MSVC lexes L#macro_arg as a single wide string literal after
pre-processing.  Clang and other conforming C preprocessors lex this as
a single 'L' token followed by a normal string literal.  Using
L###macro_arg works with all compilers.  It should be parsed as 'L' '##'
'#' 'macro_arg', where '#' stringizes the macro arg and '##' token
pastes the two tokens together to form a single string literal.

R=dtseng@chromium.org
CC=thakis@chromium.org,hans@chromium.org
BUG=82385

Review URL: https://codereview.chromium.org/342773004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278299 0039d316-1c4b-4281-b951-d872f2087c98
parent 379592fa
......@@ -42,11 +42,11 @@ AccessibilityRoleStateMap* AccessibilityRoleStateMap::GetInstance() {
AccessibilityRoleStateMap::AccessibilityRoleStateMap() {
// Convenience macros for generating readable strings.
#define IA_ROLE_MAP(x) ia_role_string_map[x] = L#x; \
ia2_role_string_map[x] = L#x;
#define IA2_ROLE_MAP(x) ia2_role_string_map[x] = L#x;
#define IA_STATE_MAP(x) ia_state_string_map[STATE_SYSTEM_##x] = L#x;
#define IA2_STATE_MAP(x) ia2_state_string_map[x] = L#x;
#define IA_ROLE_MAP(x) ia_role_string_map[x] = L###x; \
ia2_role_string_map[x] = L###x;
#define IA2_ROLE_MAP(x) ia2_role_string_map[x] = L###x;
#define IA_STATE_MAP(x) ia_state_string_map[STATE_SYSTEM_##x] = L###x;
#define IA2_STATE_MAP(x) ia2_state_string_map[x] = L###x;
// MSAA / IAccessible roles. Each one of these is also a valid
// IAccessible2 role, the IA_ROLE_MAP macro adds it to both.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment