OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 // Modified from the Chromium original: | 11 // Modified from the Chromium original: |
12 // src/base/strings/stringize_macros.h | 12 // src/base/strings/stringize_macros.h |
13 | 13 |
14 // This file defines preprocessor macros for stringizing preprocessor | 14 // This file defines preprocessor macros for stringizing preprocessor |
15 // symbols (or their output) and manipulating preprocessor symbols | 15 // symbols (or their output) and manipulating preprocessor symbols |
16 // that define strings. | 16 // that define strings. |
17 | 17 |
18 #ifndef WEBRTC_BASE_STRINGIZE_MACROS_H_ | 18 #ifndef WEBRTC_RTC_BASE_STRINGIZE_MACROS_H_ |
19 #define WEBRTC_BASE_STRINGIZE_MACROS_H_ | 19 #define WEBRTC_RTC_BASE_STRINGIZE_MACROS_H_ |
20 | 20 |
21 // This is not very useful as it does not expand defined symbols if | 21 // This is not very useful as it does not expand defined symbols if |
22 // called directly. Use its counterpart without the _NO_EXPANSION | 22 // called directly. Use its counterpart without the _NO_EXPANSION |
23 // suffix, below. | 23 // suffix, below. |
24 #define STRINGIZE_NO_EXPANSION(x) #x | 24 #define STRINGIZE_NO_EXPANSION(x) #x |
25 | 25 |
26 // Use this to quote the provided parameter, first expanding it if it | 26 // Use this to quote the provided parameter, first expanding it if it |
27 // is a preprocessor symbol. | 27 // is a preprocessor symbol. |
28 // | 28 // |
29 // For example, if: | 29 // For example, if: |
30 // #define A FOO | 30 // #define A FOO |
31 // #define B(x) myobj->FunctionCall(x) | 31 // #define B(x) myobj->FunctionCall(x) |
32 // | 32 // |
33 // Then: | 33 // Then: |
34 // STRINGIZE(A) produces "FOO" | 34 // STRINGIZE(A) produces "FOO" |
35 // STRINGIZE(B(y)) produces "myobj->FunctionCall(y)" | 35 // STRINGIZE(B(y)) produces "myobj->FunctionCall(y)" |
36 #define STRINGIZE(x) STRINGIZE_NO_EXPANSION(x) | 36 #define STRINGIZE(x) STRINGIZE_NO_EXPANSION(x) |
37 | 37 |
38 #endif // WEBRTC_BASE_STRINGIZE_MACROS_H_ | 38 #endif // WEBRTC_RTC_BASE_STRINGIZE_MACROS_H_ |
OLD | NEW |