version issues with xulrunner api

This commit is contained in:
David Rose 2012-04-24 16:44:17 +00:00
parent 753fa8e8fd
commit adf5131190
2 changed files with 13 additions and 3 deletions

View File

@ -116,9 +116,13 @@ open_logfile() {
// get the mimetypes and extensions this plugin is
// supposed to handle.
////////////////////////////////////////////////////////////////////
const char*
#if NP_VERSION_MAJOR == 0 && NP_VERSION_MINOR <= 22
char *
#else
const char *
#endif
NP_GetMIMEDescription(void) {
return (const char*) "application/x-panda3d:p3d:Panda3D applet;";
return "application/x-panda3d:p3d:Panda3D applet;";
}
////////////////////////////////////////////////////////////////////

View File

@ -29,7 +29,13 @@ extern "C" {
NPPluginFuncs *pluginFuncs);
#endif
const char* NP_GetMIMEDescription(void);
#if NP_VERSION_MAJOR == 0 && NP_VERSION_MINOR <= 22
// Until at least 0.22, this function was declared to return a char *.
char *NP_GetMIMEDescription(void);
#else
// At some point after 0.22, it was corrected to return a const char *.
const char *NP_GetMIMEDescription(void);
#endif
NPError NP_GetValue(void*, NPPVariable variable, void* value);
NPError OSCALL NP_GetEntryPoints(NPPluginFuncs *pluginFuncs);
NPError OSCALL NP_Shutdown(void);