diff options
author | sbc <sbc@chromium.org> | 2015-03-20 15:11:31 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-20 22:12:06 +0000 |
commit | 9bba26078d593898ccdb2378a0b56de0030877e3 (patch) | |
tree | f111e67e5a58863acfda0f22c190a22869b9b3d5 /native_client_sdk/src | |
parent | 8efc3b5a5e7b24ffeed0e5576a725b77868eb9ab (diff) | |
download | chromium_src-9bba26078d593898ccdb2378a0b56de0030877e3.zip chromium_src-9bba26078d593898ccdb2378a0b56de0030877e3.tar.gz chromium_src-9bba26078d593898ccdb2378a0b56de0030877e3.tar.bz2 |
[NaCl SDK] Add ps_internal.h to declare shared internal symbols.
These were two internal symbols (one global and one
function) that were previously declared in three different
sources. This change adds a new header where they can
be declared in a single location ensuring thier types
match.
Review URL: https://codereview.chromium.org/1028733003
Cr-Commit-Position: refs/heads/master@{#321649}
Diffstat (limited to 'native_client_sdk/src')
5 files changed, 22 insertions, 9 deletions
diff --git a/native_client_sdk/src/libraries/ppapi_simple/library.dsc b/native_client_sdk/src/libraries/ppapi_simple/library.dsc index bf4880b..e931da18 100644 --- a/native_client_sdk/src/libraries/ppapi_simple/library.dsc +++ b/native_client_sdk/src/libraries/ppapi_simple/library.dsc @@ -23,6 +23,7 @@ "ps_event.h", "ps_instance.h", "ps_interface.h", + "ps_internal.h", "ps_main.h", ], 'DEST': 'include/ppapi_simple', diff --git a/native_client_sdk/src/libraries/ppapi_simple/ps_entrypoints_c.c b/native_client_sdk/src/libraries/ppapi_simple/ps_entrypoints_c.c index 8eb4cbb..9fe92c6 100644 --- a/native_client_sdk/src/libraries/ppapi_simple/ps_entrypoints_c.c +++ b/native_client_sdk/src/libraries/ppapi_simple/ps_entrypoints_c.c @@ -7,11 +7,7 @@ #include <ppapi/c/ppb.h> #include "ppapi_simple/ps_interface.h" - -/* Defined in ps_instance.c. */ -const void* PSGetInterfaceImplementation(const char*); - -extern PPB_GetInterface g_ps_get_interface; +#include "ppapi_simple/ps_internal.h" /* This is defined to allow an executable to force inclusion of this object * file. Otherwise PPP_* functions won't be linked in (because they are not diff --git a/native_client_sdk/src/libraries/ppapi_simple/ps_instance.c b/native_client_sdk/src/libraries/ppapi_simple/ps_instance.c index 77628b5..3374736 100644 --- a/native_client_sdk/src/libraries/ppapi_simple/ps_instance.c +++ b/native_client_sdk/src/libraries/ppapi_simple/ps_instance.c @@ -34,6 +34,7 @@ #include "nacl_io/nacl_io.h" #include "nacl_io/log.h" #include "ppapi_simple/ps_interface.h" +#include "ppapi_simple/ps_internal.h" #include "ppapi_simple/ps_main.h" struct StartInfo { diff --git a/native_client_sdk/src/libraries/ppapi_simple/ps_internal.h b/native_client_sdk/src/libraries/ppapi_simple/ps_internal.h new file mode 100644 index 0000000..360b119 --- /dev/null +++ b/native_client_sdk/src/libraries/ppapi_simple/ps_internal.h @@ -0,0 +1,18 @@ +/* Copyright 2015 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. */ + +#ifndef PPAPI_SIMPLE_PS_INTERNAL_H_ +#define PPAPI_SIMPLE_PS_INTERNAL_H_ + +#include "ppapi/c/ppb.h" + +EXTERN_C_BEGIN + +/* Defined in ps_instance.c. */ +const void* PSGetInterfaceImplementation(const char*); +extern PPB_GetInterface g_ps_get_interface; + +EXTERN_C_END + +#endif /* PPAPI_SIMPLE_PS_INTERNAL_H_ */ diff --git a/native_client_sdk/src/libraries/ppapi_simple_cpp/ps_entrypoints_cpp.cc b/native_client_sdk/src/libraries/ppapi_simple_cpp/ps_entrypoints_cpp.cc index 3552b2d..01760ae 100644 --- a/native_client_sdk/src/libraries/ppapi_simple_cpp/ps_entrypoints_cpp.cc +++ b/native_client_sdk/src/libraries/ppapi_simple_cpp/ps_entrypoints_cpp.cc @@ -10,6 +10,7 @@ #include <ppapi/cpp/module.h> #include "ppapi_simple/ps_interface.h" +#include "ppapi_simple/ps_internal.h" class PSModule : public pp::Module { public: @@ -42,10 +43,6 @@ Module* CreateModule() { extern "C" { -// Defined in ps_instance.c. -const void* PSGetInterfaceImplementation(const char*); -extern PPB_GetInterface g_ps_get_interface; - // This is defined to allow an executable to force inclusion of this object // file. Otherwise PPP_* functions won't be linked in (because they are not // needed until -lppapi on the link-line, which is usually last. |