Closed Bug 122488 Opened 23 years ago Closed 14 years ago

NPN_SetValue declaration inconsistent with documentation

Categories

(Core Graveyard :: Plug-ins, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: beard, Assigned: oeschger)

References

()

Details

(Whiteboard: DOCUMENTATION)

The documentation for NPN_SetValue says that the type of the variable parameter
should be NPNVariable, yet it is declared as an NPPVariable in <npapi.h>. Either
the code or the documentation should be fixed. I encountered this, because I
want to add a new variable to the enumeration to manage the JSContext stack to
fix bug #118003.
Whiteboard: DOCUMEN
Ideally, we should have had four sets of variables by two (set and get) for
NPN_* and NPP_* counterpart. But we historically have only two. NPPVariable is
used for both setting and getting. This is the cause of the confusion. We may
leave the code as is but the documentation needs to be updated like this:

#include <npapi.h>
NPError NPN_SetValue(NPP         instance,
-                    NPNVariable variable, 
+                    NPPVariable variable, 
                     void        *value);
Assignee: av → oeschger
Whiteboard: DOCUMEN → DOCUMENTATION
Roger on the doc update needed. ACCEPTING.
Status: NEW → ASSIGNED
updated the NPN_SetValue method per av's suggestion:
http://elwood:20007/dev/devedge/library/manuals/2002/plugin/1.0/npn_api17.html

This location is the staging server for the new devedge material going up
shortly. Sorry for all the jumping around, but the final location--and don't
quote me on this quite yet--will be something like
devedge/library/manuals/2002/plugin/1.0/.

I guess I will try and update the old guide too (?). Not sure where the "source"
is for the original plug-in guide.
moving stuff over to an outside-the-firewall email for the time being, looking
for people to pick these Help and doc bugs up for me.
Assignee: oeschger → oeschger
Status: ASSIGNED → NEW
QA Contact: shrir → plugins
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.