/core/externals/update-engine/Samples/EngineRunner/ERUtilities.h
http://macfuse.googlecode.com/ · C Header · 22 lines · 2 code · 1 blank · 19 comment · 0 complexity · 335e51415377a52231bb2bdcd0f2114f MD5 · raw file
- // Copyright 2008 Google Inc.
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
- // Some preprocessor magic to turn a command-line
- // -DUPDATE_ENGINE_VERSION=R35 into a string, and then into an
- // NSString. With -DBLAH=SNORK Doing CONVERT_SYMBOL_TO_NSSTRING(BLAH)
- // will cause it to expand to CONVERT_SYMBOL_TO_NSSTRING2(SNORK).
- // Then CONVERT_SYMBOL_TO_NSSTRING_2 will stringize SNORK and turn it
- // into a quoted string, with the @ to turn it into an NSString.
- #define CONVERT_SYMBOL_TO_NSSTRING_2(x) @#x
- #define CONVERT_SYMBOL_TO_NSSTRING(x) CONVERT_SYMBOL_TO_NSSTRING_2(x)