[vlc-commits] NPUnix: remove nonsensicall assignations...
Jean-Baptiste Kempf
git at videolan.org
Wed Apr 23 19:41:13 CEST 2014
npapi-vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Apr 23 19:34:17 2014 +0200| [1d567c16f57d0013d803a2831b70ac05265d50d3] | committer: Jean-Baptiste Kempf
NPUnix: remove nonsensicall assignations...
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=1d567c16f57d0013d803a2831b70ac05265d50d3
---
npapi/support/npunix.cpp | 93 +---------------------------------------------
1 file changed, 2 insertions(+), 91 deletions(-)
diff --git a/npapi/support/npunix.cpp b/npapi/support/npunix.cpp
index 1f3f778..1807102 100644
--- a/npapi/support/npunix.cpp
+++ b/npapi/support/npunix.cpp
@@ -860,99 +860,10 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
* the whole structure, because the Netscape function table
* could actually be bigger than what we expect.
*/
- int minor = nsTable->version & 0xFF;
+ gNetscapeFuncs = *nsTable;
- gNetscapeFuncs.version = nsTable->version;
- gNetscapeFuncs.size = nsTable->size;
- gNetscapeFuncs.posturl = nsTable->posturl;
- gNetscapeFuncs.geturl = nsTable->geturl;
- gNetscapeFuncs.requestread = nsTable->requestread;
- gNetscapeFuncs.newstream = nsTable->newstream;
- gNetscapeFuncs.write = nsTable->write;
- gNetscapeFuncs.destroystream = nsTable->destroystream;
- gNetscapeFuncs.status = nsTable->status;
- gNetscapeFuncs.uagent = nsTable->uagent;
- gNetscapeFuncs.memalloc = nsTable->memalloc;
- gNetscapeFuncs.memfree = nsTable->memfree;
- gNetscapeFuncs.memflush = nsTable->memflush;
- gNetscapeFuncs.reloadplugins = nsTable->reloadplugins;
-#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) >= 20)
- gNetscapeFuncs.pluginthreadasynccall =
- nsTable->pluginthreadasynccall;
-#endif
- gNetscapeFuncs.getvalue = nsTable->getvalue;
- gNetscapeFuncs.setvalue = nsTable->setvalue;
- if( minor >= NPVERS_HAS_NOTIFICATION )
- {
- gNetscapeFuncs.geturlnotify = nsTable->geturlnotify;
- gNetscapeFuncs.posturlnotify = nsTable->posturlnotify;
- }
-
- if (nsTable->size >= ((char *)&nsTable->setexception - (char *)nsTable))
- {
- gNetscapeFuncs.invalidaterect = nsTable->invalidaterect;
- gNetscapeFuncs.invalidateregion = nsTable->invalidateregion;
- gNetscapeFuncs.forceredraw = nsTable->forceredraw;
- /* npruntime support */
- if (minor >= 14)
- {
- gNetscapeFuncs.getstringidentifier = nsTable->getstringidentifier;
- gNetscapeFuncs.getstringidentifiers = nsTable->getstringidentifiers;
- gNetscapeFuncs.getintidentifier = nsTable->getintidentifier;
- gNetscapeFuncs.identifierisstring = nsTable->identifierisstring;
- gNetscapeFuncs.utf8fromidentifier = nsTable->utf8fromidentifier;
- gNetscapeFuncs.intfromidentifier = nsTable->intfromidentifier;
- gNetscapeFuncs.createobject = nsTable->createobject;
- gNetscapeFuncs.retainobject = nsTable->retainobject;
- gNetscapeFuncs.releaseobject = nsTable->releaseobject;
- gNetscapeFuncs.invoke = nsTable->invoke;
- gNetscapeFuncs.invokeDefault = nsTable->invokeDefault;
- gNetscapeFuncs.evaluate = nsTable->evaluate;
- gNetscapeFuncs.getproperty = nsTable->getproperty;
- gNetscapeFuncs.setproperty = nsTable->setproperty;
- gNetscapeFuncs.removeproperty = nsTable->removeproperty;
- gNetscapeFuncs.hasproperty = nsTable->hasproperty;
- gNetscapeFuncs.hasmethod = nsTable->hasmethod;
- gNetscapeFuncs.releasevariantvalue = nsTable->releasevariantvalue;
- gNetscapeFuncs.setexception = nsTable->setexception;
- }
- }
- else
- {
- gNetscapeFuncs.invalidaterect = NULL;
- gNetscapeFuncs.invalidateregion = NULL;
- gNetscapeFuncs.forceredraw = NULL;
- gNetscapeFuncs.getstringidentifier = NULL;
- gNetscapeFuncs.getstringidentifiers = NULL;
- gNetscapeFuncs.getintidentifier = NULL;
- gNetscapeFuncs.identifierisstring = NULL;
- gNetscapeFuncs.utf8fromidentifier = NULL;
- gNetscapeFuncs.intfromidentifier = NULL;
- gNetscapeFuncs.createobject = NULL;
- gNetscapeFuncs.retainobject = NULL;
- gNetscapeFuncs.releaseobject = NULL;
- gNetscapeFuncs.invoke = NULL;
- gNetscapeFuncs.invokeDefault = NULL;
- gNetscapeFuncs.evaluate = NULL;
- gNetscapeFuncs.getproperty = NULL;
- gNetscapeFuncs.setproperty = NULL;
- gNetscapeFuncs.removeproperty = NULL;
- gNetscapeFuncs.hasproperty = NULL;
- gNetscapeFuncs.releasevariantvalue = NULL;
- gNetscapeFuncs.setexception = NULL;
- }
- if (nsTable->size >=
- ((char *)&nsTable->poppopupsenabledstate - (char *)nsTable))
- {
- gNetscapeFuncs.pushpopupsenabledstate = nsTable->pushpopupsenabledstate;
- gNetscapeFuncs.poppopupsenabledstate = nsTable->poppopupsenabledstate;
- }
- else
- {
- gNetscapeFuncs.pushpopupsenabledstate = NULL;
- gNetscapeFuncs.poppopupsenabledstate = NULL;
- }
+ int minor = nsTable->version & 0xFF;
/*
* Set up the plugin function table that Netscape will use to
More information about the vlc-commits
mailing list