summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-10-05 07:56:33 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-10-05 07:56:33 (GMT)
commit2c0bff630ac5b6268ce2a9a3d0fa980d28489824 (patch)
treeb2d0906304f14a10123145871582fd8e69d8c0bb /generic
parenta50dcb923a50640e31a433c872caa63630d8202d (diff)
parentbfd2f2fbf7a0c7fb68ded3c44b169cb5ce97c24f (diff)
downloadtcl-2c0bff630ac5b6268ce2a9a3d0fa980d28489824.zip
tcl-2c0bff630ac5b6268ce2a9a3d0fa980d28489824.tar.gz
tcl-2c0bff630ac5b6268ce2a9a3d0fa980d28489824.tar.bz2
merge trunk
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.h18
-rw-r--r--generic/tclBinary.c4
-rw-r--r--generic/tclIO.c12
-rw-r--r--generic/tclIOSock.c15
-rw-r--r--generic/tclInt.h8
-rw-r--r--generic/tclMain.c4
-rw-r--r--generic/tclOO.c2
-rw-r--r--generic/tclOO.h5
-rw-r--r--generic/tclOOBasic.c2
-rw-r--r--generic/tclOOCall.c2
-rw-r--r--generic/tclOODefineCmds.c2
-rw-r--r--generic/tclOOInfo.c2
-rw-r--r--generic/tclOOInt.h2
-rw-r--r--generic/tclOOMethod.c2
-rw-r--r--generic/tclStubInit.c8
15 files changed, 53 insertions, 35 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index 9a7c224..5f4a77a 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -58,10 +58,10 @@ extern "C" {
#define TCL_MAJOR_VERSION 8
#define TCL_MINOR_VERSION 6
#define TCL_RELEASE_LEVEL TCL_BETA_RELEASE
-#define TCL_RELEASE_SERIAL 2
+#define TCL_RELEASE_SERIAL 3
#define TCL_VERSION "8.6"
-#define TCL_PATCH_LEVEL "8.6b2"
+#define TCL_PATCH_LEVEL "8.6b3"
/*
*----------------------------------------------------------------------------
@@ -500,7 +500,9 @@ typedef unsigned TCL_WIDE_INT_TYPE Tcl_WideUInt;
* accessed with Tcl_GetObjResult() and Tcl_SetObjResult().
*/
-typedef struct Tcl_Interp {
+typedef struct Tcl_Interp
+#ifndef TCL_NO_DEPRECATED
+{
/* TIP #330: Strongly discourage extensions from using the string
* result. */
#ifdef USE_INTERP_RESULT
@@ -517,8 +519,8 @@ typedef struct Tcl_Interp {
* Tcl_Eval must free it before executing next
* command. */
#else
- char *unused3 TCL_DEPRECATED_API("bad field access");
- void (*unused4) (char *) TCL_DEPRECATED_API("bad field access");
+ char *resultDontUse; /* Don't use in extensions! */
+ void (*freeProcDontUse) (char *); /* Don't use in extensions! */
#endif
#ifdef USE_INTERP_ERRORLINE
int errorLine TCL_DEPRECATED_API("use Tcl_GetErrorLine/Tcl_SetErrorLine");
@@ -526,9 +528,11 @@ typedef struct Tcl_Interp {
* line number within the command where the
* error occurred (1 if first line). */
#else
- int unused5 TCL_DEPRECATED_API("bad field access");
+ int errorLineDontUse; /* Don't use in extensions! */
#endif
-} Tcl_Interp;
+}
+#endif /* TCL_NO_DEPRECATED */
+Tcl_Interp;
typedef struct Tcl_AsyncHandler_ *Tcl_AsyncHandler;
typedef struct Tcl_Channel_ *Tcl_Channel;
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index 4953e27..3d8b24c 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -309,10 +309,10 @@ Tcl_SetByteArrayObj(
byteArrayPtr = ckalloc(BYTEARRAY_SIZE(length));
byteArrayPtr->used = length;
byteArrayPtr->allocated = length;
- if (length && bytes) {
+
+ if ((bytes != NULL) && (length > 0)) {
memcpy(byteArrayPtr->bytes, bytes, (size_t) length);
}
-
objPtr->typePtr = &tclByteArrayType;
SET_BYTEARRAY(objPtr, byteArrayPtr);
}
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 4e24533..0cb9fa9 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -879,19 +879,25 @@ CheckForStdChannelsBeingClosed(
ChannelState *statePtr = ((Channel *) chan)->state;
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
- if ((chan == tsdPtr->stdinChannel) && tsdPtr->stdinInitialized) {
+ if (tsdPtr->stdinInitialized
+ && tsdPtr->stdinChannel != NULL
+ && statePtr == ((Channel *)tsdPtr->stdinChannel)->state) {
if (statePtr->refCount < 2) {
statePtr->refCount = 0;
tsdPtr->stdinChannel = NULL;
return;
}
- } else if ((chan == tsdPtr->stdoutChannel) && tsdPtr->stdoutInitialized) {
+ } else if (tsdPtr->stdoutInitialized
+ && tsdPtr->stdoutChannel != NULL
+ && statePtr == ((Channel *)tsdPtr->stdoutChannel)->state) {
if (statePtr->refCount < 2) {
statePtr->refCount = 0;
tsdPtr->stdoutChannel = NULL;
return;
}
- } else if ((chan == tsdPtr->stderrChannel) && tsdPtr->stderrInitialized) {
+ } else if (tsdPtr->stderrInitialized
+ && tsdPtr->stderrChannel != NULL
+ && statePtr == ((Channel *)tsdPtr->stderrChannel)->state) {
if (statePtr->refCount < 2) {
statePtr->refCount = 0;
tsdPtr->stderrChannel = NULL;
diff --git a/generic/tclIOSock.c b/generic/tclIOSock.c
index e603c91..694501f 100644
--- a/generic/tclIOSock.c
+++ b/generic/tclIOSock.c
@@ -151,7 +151,7 @@ TclCreateSocketAddress(
struct addrinfo *p;
struct addrinfo *v4head = NULL, *v4ptr = NULL;
struct addrinfo *v6head = NULL, *v6ptr = NULL;
- char *native = NULL, portstring[TCL_INTEGER_SPACE];
+ char *native = NULL, portbuf[TCL_INTEGER_SPACE], *portstring;
const char *family = NULL;
Tcl_DString ds;
int result, i;
@@ -159,7 +159,18 @@ TclCreateSocketAddress(
if (host != NULL) {
native = Tcl_UtfToExternalDString(NULL, host, -1, &ds);
}
- TclFormatInt(portstring, port);
+
+ /*
+ * Workaround for OSX's apparent inability to resolve "localhost", "0"
+ * when the loopback device is the only available network interface.
+ */
+ if (host != NULL && port == 0) {
+ portstring = NULL;
+ } else {
+ TclFormatInt(portbuf, port);
+ portstring = portbuf;
+ }
+
(void) memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
diff --git a/generic/tclInt.h b/generic/tclInt.h
index f1a6fce..df1fa37 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -801,13 +801,17 @@ typedef struct VarInHash {
#define TclSetVarNamespaceVar(varPtr) \
if (!TclIsVarNamespaceVar(varPtr)) {\
(varPtr)->flags |= VAR_NAMESPACE_VAR;\
- ((VarInHash *)(varPtr))->refCount++;\
+ if (TclIsVarInHash(varPtr)) {\
+ ((VarInHash *)(varPtr))->refCount++;\
+ }\
}
#define TclClearVarNamespaceVar(varPtr) \
if (TclIsVarNamespaceVar(varPtr)) {\
(varPtr)->flags &= ~VAR_NAMESPACE_VAR;\
- ((VarInHash *)(varPtr))->refCount--;\
+ if (TclIsVarInHash(varPtr)) {\
+ ((VarInHash *)(varPtr))->refCount--;\
+ }\
}
/*
diff --git a/generic/tclMain.c b/generic/tclMain.c
index 14139ec..f445383 100644
--- a/generic/tclMain.c
+++ b/generic/tclMain.c
@@ -334,14 +334,14 @@ Tcl_MainEx(
*/
if ((argc > 3) && (0 == _tcscmp(TEXT("-encoding"), argv[1]))
- && (TEXT('-') != argv[3][0])) {
+ && ('-' != argv[3][0])) {
Tcl_Obj *value = NewNativeObj(argv[2], -1);
Tcl_SetStartupScript(NewNativeObj(argv[3], -1),
Tcl_GetString(value));
Tcl_DecrRefCount(value);
argc -= 3;
argv += 3;
- } else if ((argc > 1) && (TEXT('-') != argv[1][0])) {
+ } else if ((argc > 1) && ('-' != argv[1][0])) {
Tcl_SetStartupScript(NewNativeObj(argv[1], -1), NULL);
argc--;
argv++;
diff --git a/generic/tclOO.c b/generic/tclOO.c
index d9f5d60..04a2bf7 100644
--- a/generic/tclOO.c
+++ b/generic/tclOO.c
@@ -3,7 +3,7 @@
*
* This file contains the object-system core (NB: not Tcl_Obj, but ::oo)
*
- * Copyright (c) 2005-2011 by Donal K. Fellows
+ * Copyright (c) 2005-2012 by Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclOO.h b/generic/tclOO.h
index fef2bd0..280481c 100644
--- a/generic/tclOO.h
+++ b/generic/tclOO.h
@@ -4,7 +4,7 @@
* This file contains the public API definitions and some of the function
* declarations for the object-system (NB: not Tcl_Obj, but ::oo).
*
- * Copyright (c) 2006-2008 by Donal K. Fellows
+ * Copyright (c) 2006-2010 by Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -34,11 +34,12 @@ extern const char *TclOOInitializeStubs(
* version in the files:
*
* tests/oo.test
+ * tests/ooNext2.test
* unix/tclooConfig.sh
* win/tclooConfig.sh
*/
-#define TCLOO_VERSION "0.6.3"
+#define TCLOO_VERSION "0.7"
#define TCLOO_PATCHLEVEL TCLOO_VERSION
/*
diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c
index 3637ede..0676618 100644
--- a/generic/tclOOBasic.c
+++ b/generic/tclOOBasic.c
@@ -4,7 +4,7 @@
* This file contains implementations of the "simple" commands and
* methods from the object-system core.
*
- * Copyright (c) 2005-2011 by Donal K. Fellows
+ * Copyright (c) 2005-2012 by Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c
index 760bd7b..a79e4fa 100644
--- a/generic/tclOOCall.c
+++ b/generic/tclOOCall.c
@@ -4,7 +4,7 @@
* This file contains the method call chain management code for the
* object-system core.
*
- * Copyright (c) 2005-2011 by Donal K. Fellows
+ * Copyright (c) 2005-2012 by Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c
index c022e6b..bacab38 100644
--- a/generic/tclOODefineCmds.c
+++ b/generic/tclOODefineCmds.c
@@ -4,7 +4,7 @@
* This file contains the implementation of the ::oo::define command,
* part of the object-system core (NB: not Tcl_Obj, but ::oo).
*
- * Copyright (c) 2006-2008 by Donal K. Fellows
+ * Copyright (c) 2006-2012 by Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c
index 796442b..1a94e69 100644
--- a/generic/tclOOInfo.c
+++ b/generic/tclOOInfo.c
@@ -4,7 +4,7 @@
* This file contains the implementation of the ::oo-related [info]
* subcommands.
*
- * Copyright (c) 2006-2008 by Donal K. Fellows
+ * Copyright (c) 2006-2011 by Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h
index 631961f..ab54964 100644
--- a/generic/tclOOInt.h
+++ b/generic/tclOOInt.h
@@ -4,7 +4,7 @@
* This file contains the structure definitions and some of the function
* declarations for the object-system (NB: not Tcl_Obj, but ::oo).
*
- * Copyright (c) 2006-2011 by Donal K. Fellows
+ * Copyright (c) 2006-2012 by Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c
index 60eaa6e..28820e0 100644
--- a/generic/tclOOMethod.c
+++ b/generic/tclOOMethod.c
@@ -3,7 +3,7 @@
*
* This file contains code to create and manage methods.
*
- * Copyright (c) 2005-2008 by Donal K. Fellows
+ * Copyright (c) 2005-2011 by Donal K. Fellows
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 0fc35d5..a8d74ee 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -169,14 +169,6 @@ Tcl_WinTCharToUtf(
string, len, dsPtr);
}
-#define TclMacOSXGetFileAttribute (int (*) (Tcl_Interp *, \
- int, Tcl_Obj *, Tcl_Obj **)) TclpCreateProcess
-#define TclMacOSXMatchType (int (*) (Tcl_Interp *, const char *, \
- const char *, Tcl_StatBuf *, Tcl_GlobTypeData *)) TclpMakeFile
-#define TclMacOSXNotifierAddRunLoopMode (void (*) (const void *)) TclpOpenFile
-#define TclpLocaltime_unix (struct tm *(*) (const time_t *)) TclGetAndDetachPids
-#define TclpGmtime_unix (struct tm *(*) (const time_t *)) TclpCloseFile
-
#else /* UNIX and MAC */
# define TclpLocaltime_unix TclpLocaltime
# define TclpGmtime_unix TclpGmtime