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

Unified Diff: native_client_sdk/src/libraries/ppapi_main/ppapi_main.h

Issue 13488007: [NaCl SDK] Make the SDK examples buildable as a packaged app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix license headers Created 7 years, 8 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 | « native_client_sdk/src/libraries/nacl_io/mount_node.cc ('k') | native_client_sdk/src/tools/common.mk » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/libraries/ppapi_main/ppapi_main.h
diff --git a/native_client_sdk/src/libraries/ppapi_main/ppapi_main.h b/native_client_sdk/src/libraries/ppapi_main/ppapi_main.h
index af5217a34175780e7ac46456726042758c0c7303..9bfe5b5e7c136139981a58f51a5badf4af4844bd 100644
--- a/native_client_sdk/src/libraries/ppapi_main/ppapi_main.h
+++ b/native_client_sdk/src/libraries/ppapi_main/ppapi_main.h
@@ -41,15 +41,11 @@ void PPAPIRender(uint32_t width, uint32_t height);
EXTERN_C_END
-#define PPAPI_MAIN_DEFAULT_ARGS \
- { \
- NULL, NULL \
- }
+#define PPAPI_MAIN_DEFAULT_ARGS NULL, NULL
-
-#define PPAPI_MAIN_USE(factory, args) \
+#define PPAPI_MAIN_USE(factory, ...) \
void* UserCreateInstance(PP_Instance inst) { \
- static const char *params[] = args; \
+ static const char *params[] = { __VA_ARGS__ }; \
return factory(inst, params); \
}
@@ -59,8 +55,8 @@ void* UserCreateInstance(PP_Instance inst) { \
#define PPAPI_MAIN_3D_WITH_DEFAULT_ARGS \
PPAPI_MAIN_USE(PPAPI_CreateInstance3D, PPAPI_MAIN_DEFAULT_ARGS)
-#define PPAPI_MAIN_WITH_ARGS(args) \
- PPAPI_MAIN_USE(PPAPI_CreateInstance, args)
+#define PPAPI_MAIN_WITH_ARGS(...) \
+ PPAPI_MAIN_USE(PPAPI_CreateInstance, __VA_ARGS__)
#endif // PPAPI_MAIN_PPAPI_MAIN_H_
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/mount_node.cc ('k') | native_client_sdk/src/tools/common.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698