1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05: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 static JSBool
document_get_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp) document_get_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp)
{ {
JSObject *parent = JS_GetParent(ctx, obj); JSObject *parent_win = JS_GetParent(ctx, obj);
struct view_state *vs = JS_GetPrivate(ctx, parent); /* from @window_class */ struct view_state *vs = JS_GetPrivate(ctx, parent_win); /* from @window_class */
struct document_view *doc_view = vs->doc_view; struct document_view *doc_view = vs->doc_view;
struct document *document = doc_view->document; struct document *document = doc_view->document;
struct session *ses = doc_view->session; 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)) { switch (JSVAL_TO_INT(id)) {
case JSP_DOC_LOC: case JSP_DOC_LOC:
JS_GetProperty(ctx, parent, "location", vp); JS_GetProperty(ctx, parent_win, "location", vp);
break; break;
case JSP_DOC_REF: case JSP_DOC_REF:
switch (get_opt_int("protocol.http.referer.policy")) { 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 static JSBool
document_set_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp) document_set_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp)
{ {
JSObject *parent = JS_GetParent(ctx, obj); JSObject *parent_win = JS_GetParent(ctx, obj);
struct view_state *vs = JS_GetPrivate(ctx, parent); /* from @window_class */ struct view_state *vs = JS_GetPrivate(ctx, parent_win); /* from @window_class */
struct document_view *doc_view = vs->doc_view; struct document_view *doc_view = vs->doc_view;
struct document *document = doc_view->document; struct document *document = doc_view->document;

View File

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

View File

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