1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-29 01:45:34 +00:00

Bug 846: Rename some local variables.

Rename parent to parent_win if it points to an instance of window_class.
This commit is contained in:
Kalle Olavi Niemitalo 2006-11-24 08:50:12 +02:00 committed by Kalle Olavi Niemitalo
parent 356678dd80
commit 98a120b3d5
3 changed files with 13 additions and 13 deletions

View File

@ -73,8 +73,8 @@ const JSPropertySpec document_props[] = {
static JSBool
document_get_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp)
{
JSObject *parent = JS_GetParent(ctx, obj);
struct view_state *vs = JS_GetPrivate(ctx, parent); /* from @window_class */
JSObject *parent_win = JS_GetParent(ctx, obj);
struct view_state *vs = JS_GetPrivate(ctx, parent_win); /* from @window_class */
struct document_view *doc_view = vs->doc_view;
struct document *document = doc_view->document;
struct session *ses = doc_view->session;
@ -117,7 +117,7 @@ document_get_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp)
switch (JSVAL_TO_INT(id)) {
case JSP_DOC_LOC:
JS_GetProperty(ctx, parent, "location", vp);
JS_GetProperty(ctx, parent_win, "location", vp);
break;
case JSP_DOC_REF:
switch (get_opt_int("protocol.http.referer.policy")) {
@ -160,8 +160,8 @@ document_get_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp)
static JSBool
document_set_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp)
{
JSObject *parent = JS_GetParent(ctx, obj);
struct view_state *vs = JS_GetPrivate(ctx, parent); /* from @window_class */
JSObject *parent_win = JS_GetParent(ctx, obj);
struct view_state *vs = JS_GetPrivate(ctx, parent_win); /* from @window_class */
struct document_view *doc_view = vs->doc_view;
struct document *document = doc_view->document;

View File

@ -145,8 +145,8 @@ const JSPropertySpec location_props[] = {
static JSBool
location_get_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp)
{
JSObject *parent = JS_GetParent(ctx, obj);
struct view_state *vs = JS_GetPrivate(ctx, parent); /* from @window_class */
JSObject *parent_win = JS_GetParent(ctx, obj);
struct view_state *vs = JS_GetPrivate(ctx, parent_win); /* from @window_class */
if (!JSVAL_IS_INT(id))
return JS_TRUE;
@ -169,8 +169,8 @@ location_get_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp)
static JSBool
location_set_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp)
{
JSObject *parent = JS_GetParent(ctx, obj);
struct view_state *vs = JS_GetPrivate(ctx, parent); /* from @window_class */
JSObject *parent_win = JS_GetParent(ctx, obj);
struct view_state *vs = JS_GetPrivate(ctx, parent_win); /* from @window_class */
struct document_view *doc_view = vs->doc_view;
if (!JSVAL_IS_INT(id))

View File

@ -75,8 +75,8 @@ const JSPropertySpec unibar_props[] = {
static JSBool
unibar_get_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp)
{
JSObject *parent = JS_GetParent(ctx, obj);
struct view_state *vs = JS_GetPrivate(ctx, parent); /* from @window_class */
JSObject *parent_win = JS_GetParent(ctx, obj);
struct view_state *vs = JS_GetPrivate(ctx, parent_win); /* from @window_class */
struct document_view *doc_view = vs->doc_view;
struct session_status *status = &doc_view->session->status;
unsigned char *bar = JS_GetPrivate(ctx, obj); /* from @menubar_class or @statusbar_class */
@ -115,8 +115,8 @@ unibar_get_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp)
static JSBool
unibar_set_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp)
{
JSObject *parent = JS_GetParent(ctx, obj);
struct view_state *vs = JS_GetPrivate(ctx, parent); /* from @window_class */
JSObject *parent_win = JS_GetParent(ctx, obj);
struct view_state *vs = JS_GetPrivate(ctx, parent_win); /* from @window_class */
struct document_view *doc_view = vs->doc_view;
struct session_status *status = &doc_view->session->status;
unsigned char *bar = JS_GetPrivate(ctx, obj); /* from @menubar_class or @statusbar_class */