summaryrefslogtreecommitdiff
path: root/src/if_tcl.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-09-01 20:46:49 +0000
committerBram Moolenaar <Bram@vim.org>2005-09-01 20:46:49 +0000
commite344bead3ecc16a0982d157e8c19050f6dff4e0c (patch)
tree34da48120172b9e2efc8c559733c2b69db5a24ba /src/if_tcl.c
parentda2303d96b0f55d30e9b5b57d3459d5e1ea22ec2 (diff)
downloadvim-git-e344bead3ecc16a0982d157e8c19050f6dff4e0c.tar.gz
updated for version 7.0140v7.0140
Diffstat (limited to 'src/if_tcl.c')
-rw-r--r--src/if_tcl.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/if_tcl.c b/src/if_tcl.c
index 8f75e0d08..30f7d9857 100644
--- a/src/if_tcl.c
+++ b/src/if_tcl.c
@@ -113,9 +113,10 @@ static tcl_info tclinfo = { NULL, 0, 0, 0, NULL, NULL };
/*
* List of Tcl interpreters who reference a vim window or buffer.
- * Each buffer and window has it's own list in the tcl_ref struct member.
- * We need this because Tcl can create sub-interpreters with the "interp"
- * command, and each interpreter can reference all windows and buffers.
+ * Each buffer and window has it's own list in the w_tcl_ref or b_tcl_ref
+ * struct member. We need this because Tcl can create sub-interpreters with
+ * the "interp" command, and each interpreter can reference all windows and
+ * buffers.
*/
struct ref
{
@@ -932,7 +933,7 @@ bufselfcmd(ref, interp, objc, objv)
err = TCL_ERROR;
break;
}
- err = tclsetdelcmd(interp, buf->tcl_ref, (void *)buf, objv[2]);
+ err = tclsetdelcmd(interp, buf->b_tcl_ref, (void *)buf, objv[2]);
break;
default:
@@ -1058,7 +1059,7 @@ winselfcmd(ref, interp, objc, objv)
err = TCL_ERROR;
break;
}
- err = tclsetdelcmd(interp, win->tcl_ref, (void *)win, objv[2]);
+ err = tclsetdelcmd(interp, win->w_tcl_ref, (void *)win, objv[2]);
break;
case WIN_CURSOR:
@@ -1465,7 +1466,8 @@ delref(cref)
static char *
tclgetref(interp, refstartP, prefix, vimobj, proc)
Tcl_Interp *interp;
- void **refstartP; /* ptr to tcl_ref member of win_T/buf_T struct */
+ void **refstartP; /* ptr to w_tcl_ref/b_tcl-ref member of
+ win_T/buf_T struct */
char *prefix; /* "win" or "buf" */
void *vimobj; /* win_T* or buf_T* */
Tcl_ObjCmdProc *proc; /* winselfcmd or bufselfcmd */
@@ -1533,7 +1535,7 @@ tclgetwindow(interp, win)
Tcl_Interp *interp;
win_T *win;
{
- return tclgetref(interp, &(win->tcl_ref), "win", (void *)win, winselfcmd);
+ return tclgetref(interp, &(win->w_tcl_ref), "win", (void *)win, winselfcmd);
}
static char *
@@ -1541,7 +1543,7 @@ tclgetbuffer(interp, buf)
Tcl_Interp *interp;
buf_T *buf;
{
- return tclgetref(interp, &(buf->tcl_ref), "buf", (void *)buf, bufselfcmd);
+ return tclgetref(interp, &(buf->b_tcl_ref), "buf", (void *)buf, bufselfcmd);
}
static int
@@ -2095,12 +2097,12 @@ tcl_buffer_free(buf)
return;
#endif
- reflist = (struct ref*)(buf->tcl_ref);
+ reflist = (struct ref *)(buf->b_tcl_ref);
if (reflist != &refsdeleted)
{
- buf->tcl_ref = (void *)&refsdeleted;
+ buf->b_tcl_ref = (void *)&refsdeleted;
tcldelallrefs(reflist);
- buf->tcl_ref = NULL;
+ buf->b_tcl_ref = NULL;
}
}
@@ -2116,12 +2118,12 @@ tcl_window_free(win)
return;
#endif
- reflist = (struct ref*)(win->tcl_ref);
+ reflist = (struct ref*)(win->w_tcl_ref);
if (reflist != &refsdeleted)
{
- win->tcl_ref = (void *)&refsdeleted;
+ win->w_tcl_ref = (void *)&refsdeleted;
tcldelallrefs(reflist);
- win->tcl_ref = NULL;
+ win->w_tcl_ref = NULL;
}
}
#endif