Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[patch] Can ndata be const void *? Is it used anywhere? #17

Open
GoogleCodeExporter opened this issue Sep 1, 2015 · 1 comment
Open

Comments

@GoogleCodeExporter
Copy link

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

@GoogleCodeExporter
Copy link
Author

Sorry, I was wrong. ndata is actually used in WebKit.

Original comment by Van...@gmail.com on 4 Mar 2012 at 10:00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant