summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2019-04-14 07:52:16 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2019-04-14 07:52:16 (GMT)
commite2dcb521341596da403d0b8796e07c431d933a39 (patch)
treeb83e283b9f175bc41fd5c3b97803738b15278a76
parent3947892f31c2a8a132cde0ee81977d8882639390 (diff)
downloadtcl-e2dcb521341596da403d0b8796e07c431d933a39.zip
tcl-e2dcb521341596da403d0b8796e07c431d933a39.tar.gz
tcl-e2dcb521341596da403d0b8796e07c431d933a39.tar.bz2
Removed TCL_LINK_ALLOC; it wasn't used.
-rw-r--r--doc/LinkVar.314
-rw-r--r--generic/tclLink.c3
2 files changed, 9 insertions, 8 deletions
diff --git a/doc/LinkVar.3 b/doc/LinkVar.3
index a38610b..1e42858 100644
--- a/doc/LinkVar.3
+++ b/doc/LinkVar.3
@@ -34,6 +34,11 @@ Also used by \fBTcl_LinkVar\fR to return error messages.
Name of global variable.
.AP void *addr in
Address of C variable that is to be linked to \fIvarName\fR.
+.sp
+.VS "TIP 312"
+In \fBTcl_LinkArray\fR, may be NULL to tell Tcl to create the storage
+for the array in the variable.
+.VE "TIP 312"
.AP int type in
Type of C variable for \fBTcl_LinkVar\fR or type of array element for
\fBTcl_LinkArray\fR. Must be one of \fBTCL_LINK_INT\fR,
@@ -48,9 +53,7 @@ used.
.sp
.VS "TIP 312"
In \fBTcl_LinkArray\fR, the additional linked types \fBTCL_LINK_CHARS\fR and
-\fBTCL_LINK_BYTES\fR may be used. \fBTCL_LINK_ALLOC\fR may also be OR'ed in
-to tell Tcl to manage the storage for the array in the variable (that is, the
-C variable is technically a pointer to an array, not the array itself).
+\fBTCL_LINK_BYTES\fR may be used.
.VE "TIP 312"
.sp
All the above for both functions may be
@@ -77,9 +80,8 @@ contains an error message.
.VS "TIP 312"
\fBTcl_LinkArray\fR is similar, but for arrays of fixed size (given by
the \fIsize\fR argument). When asked to allocate the backing C array
-storage (via the \fBTCL_LINK_ALLOC\fR bit), it writes the address that
-it allocated to the Tcl interpreter result in addition to storing the
-location of the array in the C variable pointed to by \fIaddr\fR.
+storage (via the \fIaddr\fR argument being NULL), it writes the
+address that it allocated to the Tcl interpreter result.
.VE "TIP 312"
.PP
The \fItype\fR argument specifies the type of the C variable,
diff --git a/generic/tclLink.c b/generic/tclLink.c
index 09ba2ed..57735f8 100644
--- a/generic/tclLink.c
+++ b/generic/tclLink.c
@@ -235,8 +235,7 @@ Tcl_LinkArray(
* will be allocated and returned as the
* interpreter result. */
int type, /* Type of C variable: TCL_LINK_INT, etc. Also
- * may have TCL_LINK_READ_ONLY and
- * TCL_LINK_ALLOC OR'ed in. */
+ * may have TCL_LINK_READ_ONLY OR'ed in. */
int size) /* Size of C variable array, >1 if array */
{
Tcl_Obj *objPtr;