| 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
|
|
|
|
|