diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2010-02-02 22:34:14 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2010-02-02 22:34:14 +0000 |
commit | fbe9ecbdefae58a6ba0bb3f23a7a3d6c23ecfcf4 (patch) | |
tree | c9911906c7e25c337ae72556f0f809c2c1b7a18b | |
parent | b7c220eef1c55426c5a7c003c4890a5b2ed97e2b (diff) |
[Author: dmaclach]
Added GTM_NSSTRINGIFY_MACRO for turning other macros into NSStrings.
R=thomasvl
DELTA=10 (10 added, 0 deleted, 0 changed)
-rwxr-xr-x | BuildScripts/PListCompiler.sh | 2 | ||||
-rw-r--r-- | GTMDefines.h | 8 | ||||
-rw-r--r-- | ReleaseNotes.txt | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/BuildScripts/PListCompiler.sh b/BuildScripts/PListCompiler.sh index 2bc9c57..f3ca6cb 100755 --- a/BuildScripts/PListCompiler.sh +++ b/BuildScripts/PListCompiler.sh @@ -58,4 +58,4 @@ done IFS=$SaveIFS # run gcc and strip out lines starting with # that the preprocessor leaves behind. -eval gcc ${split_include_paths} -E -x c "${SCRIPT_INPUT_FILE}" | sed 's/^#.*//g' > "${SCRIPT_OUTPUT_FILE}"
\ No newline at end of file +eval gcc ${split_include_paths} -E -x c "${SCRIPT_INPUT_FILE}" | sed 's/^#.*//g' > "${SCRIPT_OUTPUT_FILE}" diff --git a/GTMDefines.h b/GTMDefines.h index 3c69547..65693ea 100644 --- a/GTMDefines.h +++ b/GTMDefines.h @@ -145,6 +145,14 @@ GTM_EXTERN void _GTMUnitTestDevLog(NSString *format, ...); typedef char _GTMCompileAssertSymbol(__LINE__, msg) [ ((test) ? 1 : -1) ] #endif // _GTMCompileAssert +// Macro to allow you to create NSStrings out of other macros. +// #define FOO foo +// NSString *fooString = GTM_NSSTRINGIFY(FOO); +#if !defined (GTM_NSSTRINGIFY) + #define GTM_NSSTRINGIFY_INNER(x) @#x + #define GTM_NSSTRINGIFY(x) GTM_NSSTRINGIFY_INNER(x) +#endif + // Macro to allow fast enumeration when building for 10.5 or later, and // reliance on NSEnumerator for 10.4. Remember, NSDictionary w/ FastEnumeration // does keys, so pick the right thing, nothing is done on the FastEnumeration diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index d0f2506..4f0b6b8 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -394,6 +394,8 @@ Changes since 1.5.1 - Added PListCompiler.sh for compiling plists. +- Added GTM_NSSTRINGIFY_MACRO for turning other macros into NSStrings. + Release 1.5.1 Changes since 1.5.0 |