I've noticed that ndata is not used. At least on plugin side.
WebKit plugin implementation has a correspondence table between NPP_t* and
PluginView*. So it is not used in WebKit. Not sure about Mozilla.
So I see no reason to change ndata. Could it be marked as deprecated?
If some browsers still use it, it shouldn't be changed on plugin side.
In that case I propose to define a macro NPAPI_SDK_PLUGIN_CONST if
NPAPI_SDK_BROWSER is not set.
Similarly, browser should not modify pdata.
So the changes would be:
#ifndef NPAPI_SDK_BROWSER # define it if you're browser developer
#define NPAPI_SDK_PLUGIN_CONST const
#define NPAPI_SDK_BROWSER_CONST
#else
#define NPAPI_SDK_PLUGIN_CONST
#define NPAPI_SDK_PLUGIN_CONST const
#endif
typedef struct _NPP
{
NPAPI_SDK_BROWSER_CONST void* pdata; /* plug-in private data */
NPAPI_SDK_PLUGIN_CONST void* ndata; /* netscape private data */
} NPP_t;
Original issue reported on code.google.com by Van...@gmail.com on 24 Feb 2012 at 12:05
Original issue reported on code.google.com by
Van...@gmail.com
on 24 Feb 2012 at 12:05