AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
Entry:     JSPRINCIPALS_HOLD (Macro)
Summary:     Increments the reference count for a specified JSPrincipals struct.
Syntax:
JSPRINCIPALS_HOLD(cx, principals)

Description:
JSPRINCIPALS_HOLD maintains the specified principals in a JSPrincipals struct, principals, for a specified JSContextcx. Principals are used by the JS security mechanism. The hold is maintained by incrementing the reference count field in the struct by 1.


Example:
The following code increments the principals reference count for the MyPrincipals struct:

JSPrincipals MyPrincipals;
JSContext * MyContext;
JSRuntime *rt;
.
.
.
rt = Js_Init(32768);
MyContext = JS_NewContext(rt, 16384);
.
.
.
JSPRINCIPALS_HOLD(MyContext, MyPrincipals);


See also:
JSPRINCIPALS_DROP
JSPrincipals
JS_Init
JS_NewContext

[sh-index] Back to list of manuals