build on mac

This commit is contained in:
David Rose 2009-06-22 23:07:42 +00:00
parent f2437ed29e
commit 71d65bb60c
2 changed files with 17 additions and 1 deletions

View File

@ -147,8 +147,18 @@ NPP_SetValue(NPP instance, NPNVariable variable, void *value) {
}
// Symbol called once by the browser to initialize the plugin
#ifdef _WIN32
NPError OSCALL
NP_Initialize(NPNetscapeFuncs *browserFuncs)
#else
// On Mac, the API specifies this second parameter is included, but it
// lies. We actually don't get a second parameter on Mac, but we have
// to put it here to make the compiler happy.
NPError OSCALL
NP_Initialize(NPNetscapeFuncs *browserFuncs) {
NP_Initialize(NPNetscapeFuncs *browserFuncs,
NPPluginFuncs *pluginFuncs)
#endif
{
// save away browser functions
browser = browserFuncs;

View File

@ -20,7 +20,13 @@
#include "../plugin/load_plugin_src.h"
extern "C" {
#ifdef _WIN32
NPError OSCALL NP_Initialize(NPNetscapeFuncs *browserFuncs);
#else
NPError OSCALL NP_Initialize(NPNetscapeFuncs *browserFuncs,
NPPluginFuncs *pluginFuncs);
#endif
NPError OSCALL NP_GetEntryPoints(NPPluginFuncs *pluginFuncs);
NPError OSCALL NP_Shutdown(void);
}