diff options
author | cvs2fossil <cvs2fossil> | 2000-03-30 04:36:09 (GMT) |
---|---|---|
committer | cvs2fossil <cvs2fossil> | 2000-03-30 04:36:09 (GMT) |
commit | 0b5453c561b62764ef764923e89b8c32e3b0f3a1 (patch) | |
tree | 56004322c3888a75cfad2896ad2e4b54bb7866dd /generic | |
parent | 5f7fd015c795c68b50b9f34e28deb81c5f5549d2 (diff) | |
download | tcl-0b5453c561b62764ef764923e89b8c32e3b0f3a1.zip tcl-0b5453c561b62764ef764923e89b8c32e3b0f3a1.tar.gz tcl-0b5453c561b62764ef764923e89b8c32e3b0f3a1.tar.bz2 |
Created branch scriptics-sc-2-0-b2-syntheticscriptics_sc_2_0_b2scriptics_sc_2_0_b2_synthetic
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclClock.c | 18 | ||||
-rw-r--r-- | generic/tclCompile.c | 21 | ||||
-rw-r--r-- | generic/tclExecute.c | 53 | ||||
-rw-r--r-- | generic/tclNamesp.c | 16 |
4 files changed, 27 insertions, 81 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c index 8b2bc53..b155b4d 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclClock.c,v 1.9 2000/03/30 04:36:11 hobbs Exp $ + * RCS: @(#) $Id: tclClock.c,v 1.8 2000/01/26 03:37:40 hobbs Exp $ */ #include "tcl.h" @@ -282,13 +282,6 @@ FormatClock(interp, clockVal, useGMT, format) Tcl_MutexUnlock(&clockMutex); #endif - /* - * If the user gave us -format "", just return now - */ - if (*format == '\0') { - return TCL_OK; - } - #ifndef HAVE_TM_ZONE /* * This is a kludge for systems not having the timezone string in @@ -347,14 +340,7 @@ FormatClock(interp, clockVal, useGMT, format) tzset(); } #endif - - if (result == 0) { - /* - * A zero return is the error case (can also mean the strftime - * didn't get enough space to write into). We know it doesn't - * mean that we wrote zero chars because the check for an empty - * format string is above. - */ + if ((result == 0) && (*format != '\0')) { Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "bad format string \"", format, "\"", (char *) NULL); return TCL_ERROR; diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 7a9f64d..ed7500f 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.20 2000/03/30 04:36:11 hobbs Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.19 1999/12/12 02:26:41 hobbs Exp $ */ #include "tclInt.h" @@ -553,26 +553,9 @@ TclCleanupByteCode(codePtr) * only need to 1) decrement the ref counts of the LiteralEntry's in * its literal array, 2) call the free procs for the auxiliary data * items, and 3) free the ByteCode structure's heap object. - * - * The case for TCL_BYTECODE_PRECOMPILED (precompiled ByteCodes, - * like those generated from tbcload) is special, as they doesn't - * make use of the global literal table. They instead maintain - * private references to their literals which must be decremented. */ - if (codePtr->flags & TCL_BYTECODE_PRECOMPILED) { - register Tcl_Obj *objPtr; - - objArrayPtr = codePtr->objArrayPtr; - for (i = 0; i < numLitObjects; i++) { - objPtr = *objArrayPtr; - if (objPtr) { - Tcl_DecrRefCount(objPtr); - } - objArrayPtr++; - } - codePtr->numLitObjects = 0; - } else if (interp != NULL) { + if (interp != NULL) { /* * If the interp has already been freed, then Tcl will have already * forcefully released all the literals used by ByteCodes compiled diff --git a/generic/tclExecute.c b/generic/tclExecute.c index bc026b3..1affb53 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.10 2000/03/27 22:18:55 hobbs Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.9 1999/12/12 02:26:42 hobbs Exp $ */ #include "tclInt.h" @@ -1779,39 +1779,30 @@ TclExecuteByteCode(interp, codePtr) valuePtr = POP_OBJECT(); t1Ptr = valuePtr->typePtr; t2Ptr = value2Ptr->typePtr; - - /* - * We only want to coerce numeric validation if - * neither type is NULL. A NULL type means the arg is - * essentially an empty object ("", {} or [list]). - */ - if (!((((t1Ptr == NULL) && (valuePtr->bytes == NULL)) - || (valuePtr->bytes && (valuePtr->length == 0))) - || (((t2Ptr == NULL) && (value2Ptr->bytes == NULL)) - || (value2Ptr->bytes && (value2Ptr->length == 0))))) { - if ((t1Ptr != &tclIntType) && (t1Ptr != &tclDoubleType)) { - s1 = Tcl_GetStringFromObj(valuePtr, &length); - if (TclLooksLikeInt(s1, length)) { - (void) Tcl_GetLongFromObj((Tcl_Interp *) NULL, - valuePtr, &i); - } else { - (void) Tcl_GetDoubleFromObj((Tcl_Interp *) NULL, - valuePtr, &d1); - } - t1Ptr = valuePtr->typePtr; + + if ((t1Ptr != &tclIntType) && (t1Ptr != &tclDoubleType)) { + s1 = Tcl_GetStringFromObj(valuePtr, &length); + if (TclLooksLikeInt(s1, length)) { + (void) Tcl_GetLongFromObj((Tcl_Interp *) NULL, + valuePtr, &i); + } else { + (void) Tcl_GetDoubleFromObj((Tcl_Interp *) NULL, + valuePtr, &d1); } - if ((t2Ptr != &tclIntType) && (t2Ptr != &tclDoubleType)) { - s2 = Tcl_GetStringFromObj(value2Ptr, &length); - if (TclLooksLikeInt(s2, length)) { - (void) Tcl_GetLongFromObj((Tcl_Interp *) NULL, - value2Ptr, &i2); - } else { - (void) Tcl_GetDoubleFromObj((Tcl_Interp *) NULL, - value2Ptr, &d2); - } - t2Ptr = value2Ptr->typePtr; + t1Ptr = valuePtr->typePtr; + } + if ((t2Ptr != &tclIntType) && (t2Ptr != &tclDoubleType)) { + s2 = Tcl_GetStringFromObj(value2Ptr, &length); + if (TclLooksLikeInt(s2, length)) { + (void) Tcl_GetLongFromObj((Tcl_Interp *) NULL, + value2Ptr, &i2); + } else { + (void) Tcl_GetDoubleFromObj((Tcl_Interp *) NULL, + value2Ptr, &d2); } + t2Ptr = value2Ptr->typePtr; } + if (((t1Ptr != &tclIntType) && (t1Ptr != &tclDoubleType)) || ((t2Ptr != &tclIntType) && (t2Ptr != &tclDoubleType))) { /* diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 43b074c..b64b6cc 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -19,7 +19,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.17 2000/03/27 22:18:56 hobbs Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.16 2000/01/26 21:36:35 ericm Exp $ */ #include "tclInt.h" @@ -956,20 +956,6 @@ Tcl_Export(interp, namespacePtr, pattern, resetListFirst) } /* - * Make sure that we don't already have the pattern in the array - */ - if (nsPtr->exportArrayPtr != NULL) { - for (i = 0; i < nsPtr->numExportPatterns; i++) { - if (strcmp(pattern, nsPtr->exportArrayPtr[i]) == 0) { - /* - * The pattern already exists in the list - */ - return TCL_OK; - } - } - } - - /* * Make sure there is room in the namespace's pattern array for the * new pattern. */ |