summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-12-23 09:32:32 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-12-23 09:32:32 (GMT)
commit9394984c31c5ff3087bbdc784811b2d57fda1114 (patch)
treef5ec627adfbd07b7dc0f810e04d91ad232cc5ba3 /unix
parenta728d03f7d2b232dbc44f2669d8eb326b1029d3d (diff)
parentdedbad27485a6129dc66cda6bb0c9f51ba639ae5 (diff)
downloadtcl-9394984c31c5ff3087bbdc784811b2d57fda1114.zip
tcl-9394984c31c5ff3087bbdc784811b2d57fda1114.tar.gz
tcl-9394984c31c5ff3087bbdc784811b2d57fda1114.tar.bz2
merge novem
Diffstat (limited to 'unix')
-rw-r--r--unix/dltest/pkga.c2
-rw-r--r--unix/dltest/pkgc.c4
-rw-r--r--unix/dltest/pkgd.c4
-rw-r--r--unix/dltest/pkge.c2
-rw-r--r--unix/dltest/pkgooa.c13
-rw-r--r--unix/dltest/pkgua.c2
-rw-r--r--unix/tclUnixFCmd.c21
-rw-r--r--unix/tclUnixFile.c4
-rw-r--r--unix/tclXtTest.c2
9 files changed, 25 insertions, 29 deletions
diff --git a/unix/dltest/pkga.c b/unix/dltest/pkga.c
index d21ef95..e2943e8 100644
--- a/unix/dltest/pkga.c
+++ b/unix/dltest/pkga.c
@@ -122,7 +122,7 @@ Pkga_Init(
{
int code;
- if (Tcl_InitStubs(interp, "9.0", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
code = Tcl_PkgProvideEx(interp, "Pkga", "1.0", NULL);
diff --git a/unix/dltest/pkgc.c b/unix/dltest/pkgc.c
index a1d9ba0..83ff2ee 100644
--- a/unix/dltest/pkgc.c
+++ b/unix/dltest/pkgc.c
@@ -112,7 +112,7 @@ Pkgc_Init(
{
int code;
- if (Tcl_InitStubs(interp, "9.0", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
code = Tcl_PkgProvideEx(interp, "Pkgc", "1.7.2", NULL);
@@ -149,7 +149,7 @@ Pkgc_SafeInit(
{
int code;
- if (Tcl_InitStubs(interp, "9.0", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
code = Tcl_PkgProvideEx(interp, "Pkgc", "1.7.2", NULL);
diff --git a/unix/dltest/pkgd.c b/unix/dltest/pkgd.c
index 3718dfb..7eed681 100644
--- a/unix/dltest/pkgd.c
+++ b/unix/dltest/pkgd.c
@@ -112,7 +112,7 @@ Pkgd_Init(
{
int code;
- if (Tcl_InitStubs(interp, "9.0", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
code = Tcl_PkgProvideEx(interp, "Pkgd", "7.3", NULL);
@@ -149,7 +149,7 @@ Pkgd_SafeInit(
{
int code;
- if (Tcl_InitStubs(interp, "9.0", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
code = Tcl_PkgProvideEx(interp, "Pkgd", "7.3", NULL);
diff --git a/unix/dltest/pkge.c b/unix/dltest/pkge.c
index c3380a7..336dd50 100644
--- a/unix/dltest/pkge.c
+++ b/unix/dltest/pkge.c
@@ -38,7 +38,7 @@ Pkge_Init(
{
static const char script[] = "if 44 {open non_existent}";
- if (Tcl_InitStubs(interp, "9.0", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
return Tcl_EvalEx(interp, script, -1, 0);
diff --git a/unix/dltest/pkgooa.c b/unix/dltest/pkgooa.c
index a715fbc..9a8ef8e 100644
--- a/unix/dltest/pkgooa.c
+++ b/unix/dltest/pkgooa.c
@@ -10,7 +10,6 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
-#undef STATIC_BUILD
#include "tclOO.h"
#include <string.h>
@@ -78,7 +77,7 @@ static TclOOStubs stubsCopy = {
(Tcl_Object (*) (Tcl_Interp *, Tcl_Object, const char *,
const char *t)) Pkgooa_StubsOKObjCmd
/* More entries could be here, but those are not used
- * needed for this test-case. So, being NULL is OK. */
+ * for this test-case. So, being NULL is OK. */
};
extern DLLEXPORT int
@@ -88,7 +87,15 @@ Pkgooa_Init(
{
int code;
- if (Tcl_InitStubs(interp, "9.0", 0) == NULL) {
+ /* Any TclOO extension which uses stubs, calls
+ * both Tcl_InitStubs and Tcl_OOInitStubs() and
+ * does not use any Tcl 8.6 features should be
+ * loadable in Tcl 8.5 as well, provided the
+ * TclOO extension (for Tcl 8.5) is installed.
+ * This worked in Tcl 8.6.0, and is expected
+ * to keep working in all future Tcl 8.x releases.
+ */
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
if (tclStubsPtr == NULL) {
diff --git a/unix/dltest/pkgua.c b/unix/dltest/pkgua.c
index bb2eec1..52729ca 100644
--- a/unix/dltest/pkgua.c
+++ b/unix/dltest/pkgua.c
@@ -199,7 +199,7 @@ Pkgua_Init(
int code, cmdIndex = 0;
Tcl_Command *cmdTokens;
- if (Tcl_InitStubs(interp, "9.0", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index 6aee70f..7c2f2a4 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -1505,12 +1505,10 @@ SetGroupAttribute(
Tcl_DString ds;
struct group *groupPtr = NULL;
const char *string;
- size_t length;
string = TclGetString(attributePtr);
- length = attributePtr->length;
- native = Tcl_UtfToExternalDString(NULL, string, length, &ds);
+ native = Tcl_UtfToExternalDString(NULL, string, attributePtr->length, &ds);
groupPtr = TclpGetGrNam(native); /* INTL: Native. */
Tcl_DStringFree(&ds);
@@ -1573,12 +1571,10 @@ SetOwnerAttribute(
Tcl_DString ds;
struct passwd *pwPtr = NULL;
const char *string;
- size_t length;
string = TclGetString(attributePtr);
- length = attributePtr->length;
- native = Tcl_UtfToExternalDString(NULL, string, length, &ds);
+ native = Tcl_UtfToExternalDString(NULL, string, attributePtr->length, &ds);
pwPtr = TclpGetPwNam(native); /* INTL: Native. */
Tcl_DStringFree(&ds);
@@ -1946,16 +1942,15 @@ TclpObjNormalizePath(
int nextCheckpoint)
{
const char *currentPathEndPosition;
- size_t pathLen;
char cur;
const char *path = TclGetString(pathPtr);
+ size_t pathLen = pathPtr->length;
Tcl_DString ds;
const char *nativePath;
#ifndef NO_REALPATH
char normPath[MAXPATHLEN];
#endif
- pathLen = pathPtr->length;
/*
* We add '1' here because if nextCheckpoint is zero we know that '/'
* exists, and if it isn't zero, it must point at a directory separator
@@ -2178,7 +2173,6 @@ TclUnixOpenTemporaryFile(
{
Tcl_DString template, tmp;
const char *string;
- size_t len;
int fd;
/*
@@ -2187,8 +2181,7 @@ TclUnixOpenTemporaryFile(
if (dirObj) {
string = TclGetString(dirObj);
- len = dirObj->length;
- Tcl_UtfToExternalDString(NULL, string, len, &template);
+ Tcl_UtfToExternalDString(NULL, string, dirObj->length, &template);
} else {
Tcl_DStringInit(&template);
Tcl_DStringAppend(&template, DefaultTempDir(), -1); /* INTL: native */
@@ -2198,8 +2191,7 @@ TclUnixOpenTemporaryFile(
if (basenameObj) {
string = TclGetString(basenameObj);
- len = basenameObj->length;
- Tcl_UtfToExternalDString(NULL, string, len, &tmp);
+ Tcl_UtfToExternalDString(NULL, string, basenameObj->length, &tmp);
TclDStringAppendDString(&template, &tmp);
Tcl_DStringFree(&tmp);
} else {
@@ -2211,8 +2203,7 @@ TclUnixOpenTemporaryFile(
#ifdef HAVE_MKSTEMPS
if (extensionObj) {
string = TclGetString(extensionObj);
- len = extensionObj->length;
- Tcl_UtfToExternalDString(NULL, string, len, &tmp);
+ Tcl_UtfToExternalDString(NULL, string, extensionObj->length, &tmp);
TclDStringAppendDString(&template, &tmp);
fd = mkstemps(Tcl_DStringValue(&template), Tcl_DStringLength(&tmp));
Tcl_DStringFree(&tmp);
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index 9f77df2..1b380d8 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -938,7 +938,6 @@ TclpObjLink(
*/
if (linkAction & TCL_CREATE_SYMBOLIC_LINK) {
- size_t targetLen;
Tcl_DString ds;
Tcl_Obj *transPtr;
@@ -953,8 +952,7 @@ TclpObjLink(
return NULL;
}
target = TclGetString(transPtr);
- targetLen = transPtr->length;
- target = Tcl_UtfToExternalDString(NULL, target, targetLen, &ds);
+ target = Tcl_UtfToExternalDString(NULL, target, transPtr->length, &ds);
Tcl_DecrRefCount(transPtr);
if (symlink(target, src) != 0) {
diff --git a/unix/tclXtTest.c b/unix/tclXtTest.c
index f7c2652..cb70b58 100644
--- a/unix/tclXtTest.c
+++ b/unix/tclXtTest.c
@@ -48,7 +48,7 @@ int
Tclxttest_Init(
Tcl_Interp *interp) /* Interpreter for application. */
{
- if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
XtToolkitInitialize();