JavaScript-1.5 Reference

JS_SetContextPrivate Function

Summary

Sets the private data for a context.

Syntax

void JS_SetContextPrivate(JSContext *cx, void *data);
NameTypeDescription
cxJSContext *Pointer to a JS context for which to set private data.
datavoid *Pointer to the private data for the context.

Description

JS_SetContextPrivate sets the private data pointer for a specified JSContext, cx.

Only a pointer to data is stored with the context. The data pointer is converted to a jsval for storage purposes. You must free this pointer in your finalization code if you allocated storage for it. It is up to your application to maintain the actual data.

See Also

Groups [ Function ]
Documents [ LXR ID Search ]
Entries [ JS_GetContextPrivate ]

This page was generated by APIDOC