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

Unified Diff: include/v8config.h

Issue 23723003: Move version macros to public V8 header. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/v8.h ('k') | src/version.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8config.h
diff --git a/include/v8config.h b/include/v8config.h
index 0993a9f3e4fd9b7e13e8ca8eda8f83bb987a5bcd..adc4e3cf7306b0c6f303b506a60d1c44cba37fa6 100644
--- a/include/v8config.h
+++ b/include/v8config.h
@@ -444,4 +444,13 @@ namespace v8 { template <typename T> class AlignOfHelper { char c; T t; }; }
# define V8_ALIGNOF(type) (sizeof(::v8::AlignOfHelper<type>) - sizeof(type))
#endif
+
+// This macro accepts another macro or a string and converts it into a string
+// after preprocessor argument expansion.
+// Use like:
+// #define AGE 42
+// const gchar* greeting = V8_STRINGIFY(AGE) " today!";
+#define V8_STRINGIFY(macro_or_string) V8_STRINGIFY_ARG(macro_or_string)
+#define V8_STRINGIFY_ARG(contents) #contents
+
#endif // V8CONFIG_H_
« no previous file with comments | « include/v8.h ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698