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

Unified Diff: native_client_sdk/src/libraries/ppapi_simple/ps_main.h

Issue 914983003: [NaCl SDK] Switch ppapi_simple to C library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tty output bug Created 5 years, 10 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
Index: native_client_sdk/src/libraries/ppapi_simple/ps_main.h
diff --git a/native_client_sdk/src/libraries/ppapi_simple/ps_main.h b/native_client_sdk/src/libraries/ppapi_simple/ps_main.h
index 2b42ac45b013c1fc11a1e3306ea0da7390ff584a..2ffcccd47ea35f75ac23b18914fbfd735bc0d7be 100644
--- a/native_client_sdk/src/libraries/ppapi_simple/ps_main.h
+++ b/native_client_sdk/src/libraries/ppapi_simple/ps_main.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
+/* Copyright 2012 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. */
@@ -13,14 +13,6 @@ EXTERN_C_BEGIN
typedef int (*PSMainFunc_t)(int argc, char *argv[]);
/**
- * PSMainCreate
- *
- * Constructs an instance SimpleInstance and configures it to call into
- * the provided "main" function.
- */
-void* PSMainCreate(PP_Instance inst, PSMainFunc_t entry_point);
-
-/**
* PSUserMainGet
*
* Prototype for the user provided function which retrieves the user's main
@@ -34,14 +26,16 @@ PSMainFunc_t PSUserMainGet();
*
* Constructs a PSInstance object and configures it to use call the provided
* 'main' function on its own thread once initialization is complete.
+ *
+ * The ps_entrypoint_*.o and ps_main.o objects will not be linked by default,
+ * so we force them to be linked here.
*/
-#define PPAPI_SIMPLE_REGISTER_MAIN(main_func) \
- PSMainFunc_t PSUserMainGet() { \
- return main_func; \
- } \
- void* PSUserCreateInstance(PP_Instance inst) { \
- return PSMainCreate(inst, main_func); \
- }
+#define PPAPI_SIMPLE_REGISTER_MAIN(main_func) \
+ EXTERN_C_BEGIN \
+ FORCE_LINK_THAT(ps_entry) \
+ FORCE_LINK_THAT(ps_main) \
+ EXTERN_C_END \
+ PSMainFunc_t PSUserMainGet() { return main_func; }
EXTERN_C_END
« no previous file with comments | « native_client_sdk/src/libraries/ppapi_simple/ps_interface.cc ('k') | native_client_sdk/src/libraries/ppapi_simple/ps_main.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698