summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-06-07 21:46:08 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-06-07 21:46:08 (GMT)
commit3d9cb3d71e47525ba2c3176b8c64e6133ed9dd75 (patch)
tree862a66f9d58f2b9acc7bb0b43fc6f7f932dcc8a4
parentc2e9dac276543c87f90a314405d70427e7a9e642 (diff)
downloadtcl-3d9cb3d71e47525ba2c3176b8c64e6133ed9dd75.zip
tcl-3d9cb3d71e47525ba2c3176b8c64e6133ed9dd75.tar.gz
tcl-3d9cb3d71e47525ba2c3176b8c64e6133ed9dd75.tar.bz2
* generic/tclInt.h: Reduced the Tcl_ObjTypes "index",
* generic/tclIndexObj.c: "enembleCmd", "localVarName", and * generic/tclNamesp.c: "levelReference" to file static scope. * generic/tclProc.c: * generic/tclVar.c:
-rw-r--r--ChangeLog17
-rw-r--r--generic/tclIndexObj.c16
-rw-r--r--generic/tclInt.h6
-rw-r--r--generic/tclNamesp.c12
-rw-r--r--generic/tclProc.c10
-rw-r--r--generic/tclVar.c12
6 files changed, 36 insertions, 37 deletions
diff --git a/ChangeLog b/ChangeLog
index cbe2c25..7ace328 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,11 @@
-2005-06-07 Donal K. Fellows <dkf@users.sf.net>
-
- * win/tclWinChan.c (FileTruncateProc): Added implementation of
- file truncation for Windows.
-
2005-06-07 Don Porter <dgp@users.sourceforge.net>
+ * generic/tclInt.h: Reduced the Tcl_ObjTypes "index",
+ * generic/tclIndexObj.c: "enembleCmd", "localVarName", and
+ * generic/tclNamesp.c: "levelReference" to file static scope.
+ * generic/tclProc.c:
+ * generic/tclVar.c:
+
* generic/tclObj.c: Restored registration of the "procbody"
Tcl_ObjType, as required by the tclcompiler application.
@@ -13,8 +14,6 @@
2005-06-07 Donal K. Fellows <dkf@users.sf.net>
- * tests/chan.test (chan-15.2): Added real test of truncation.
-
* generic/tclIO.c (Tcl_ChannelTruncateProc): Stop proliferation of
* generic/tcl.h: channel type versions
* doc/CrtChannel.3: following advice from AKu
@@ -42,6 +41,10 @@
* unix/tclUnixChan.c (FileTruncateProc): Basic implementation of
truncating driver.
+ * win/tclWinChan.c (FileTruncateProc): Added implementation of
+ file truncation for Windows.
+ * tests/chan.test (chan-15.2): Added real test of truncation.
+
2005-06-06 Kevin B. Kenny <kennykb@acm.org>
* win/tclWin32Dll.c: Corrected another buglet in the assembly
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index 9b858ab..77b1965 100644
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.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: tclIndexObj.c,v 1.23 2005/06/07 10:05:00 dkf Exp $
+ * RCS: @(#) $Id: tclIndexObj.c,v 1.24 2005/06/07 21:46:08 dgp Exp $
*/
#include "tclInt.h"
@@ -31,7 +31,7 @@ static void FreeIndex _ANSI_ARGS_((Tcl_Obj *objPtr));
* procedures that can be invoked by generic object code.
*/
-Tcl_ObjType tclIndexType = {
+static Tcl_ObjType indexType = {
"index", /* name */
FreeIndex, /* freeIntRepProc */
DupIndex, /* dupIntRepProc */
@@ -110,7 +110,7 @@ Tcl_GetIndexFromObj(interp, objPtr, tablePtr, msg, flags, indexPtr)
* is cached).
*/
- if (objPtr->typePtr == &tclIndexType) {
+ if (objPtr->typePtr == &indexType) {
IndexRep *indexRep = (IndexRep *) objPtr->internalRep.otherValuePtr;
/*
* Here's hoping we don't get hit by unfortunate packing
@@ -181,7 +181,7 @@ Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr, offset, msg, flags,
* See if there is a valid cached result from a previous lookup.
*/
- if (objPtr->typePtr == &tclIndexType) {
+ if (objPtr->typePtr == &indexType) {
indexRep = (IndexRep *) objPtr->internalRep.otherValuePtr;
if (indexRep->tablePtr==tablePtr && indexRep->offset==offset) {
*indexPtr = indexRep->index;
@@ -246,13 +246,13 @@ Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr, offset, msg, flags,
* allocating a new internal-rep if at all possible since that is
* potentially a slow operation.
*/
- if (objPtr->typePtr == &tclIndexType) {
+ if (objPtr->typePtr == &indexType) {
indexRep = (IndexRep *) objPtr->internalRep.otherValuePtr;
} else {
TclFreeIntRep(objPtr);
indexRep = (IndexRep *) ckalloc(sizeof(IndexRep));
objPtr->internalRep.otherValuePtr = (VOID *) indexRep;
- objPtr->typePtr = &tclIndexType;
+ objPtr->typePtr = &indexType;
}
indexRep->tablePtr = (VOID*) tablePtr;
indexRep->offset = offset;
@@ -381,7 +381,7 @@ DupIndex(srcPtr, dupPtr)
memcpy(dupIndexRep, srcIndexRep, sizeof(IndexRep));
dupPtr->internalRep.otherValuePtr = (VOID *) dupIndexRep;
- dupPtr->typePtr = &tclIndexType;
+ dupPtr->typePtr = &indexType;
}
/*
@@ -534,7 +534,7 @@ Tcl_WrongNumArgs(interp, objc, objv, message)
* abbreviated. Otherwise, just use the string rep.
*/
- if (objv[i]->typePtr == &tclIndexType) {
+ if (objv[i]->typePtr == &indexType) {
indexRep = (IndexRep *) objv[i]->internalRep.otherValuePtr;
Tcl_AppendStringsToObj(objPtr, EXPAND_OF(indexRep), (char *) NULL);
} else {
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 17566ef..1c6f1f5 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInt.h,v 1.234 2005/06/07 10:05:00 dkf Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.235 2005/06/07 21:46:08 dgp Exp $
*/
#ifndef _TCLINT
@@ -1830,13 +1830,9 @@ MODULE_SCOPE Tcl_ObjType tclDictType;
MODULE_SCOPE Tcl_ObjType tclProcBodyType;
MODULE_SCOPE Tcl_ObjType tclStringType;
MODULE_SCOPE Tcl_ObjType tclArraySearchType;
-MODULE_SCOPE Tcl_ObjType tclIndexType;
MODULE_SCOPE Tcl_ObjType tclNsNameType;
-MODULE_SCOPE Tcl_ObjType tclEnsembleCmdType;
MODULE_SCOPE Tcl_ObjType tclWideIntType;
-MODULE_SCOPE Tcl_ObjType tclLocalVarNameType;
MODULE_SCOPE Tcl_ObjType tclRegexpType;
-MODULE_SCOPE Tcl_ObjType tclLevelReferenceType;
/*
* Variables denoting the hash key types defined in the core.
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index c49bd43..9935f47 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -21,7 +21,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.76 2005/05/30 00:04:48 dkf Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.77 2005/06/07 21:46:18 dgp Exp $
*/
#include "tclInt.h"
@@ -299,7 +299,7 @@ Tcl_ObjType tclNsNameType = {
* the real command that implements it.
*/
-Tcl_ObjType tclEnsembleCmdType = {
+static Tcl_ObjType ensembleCmdType = {
"ensembleCommand", /* the type's name */
FreeEnsembleCmdRep, /* freeIntRepProc */
DupEnsembleCmdRep, /* dupIntRepProc */
@@ -5856,7 +5856,7 @@ NsEnsembleImplementationCmd(clientData, interp, objc, objv)
* subcommand.
*/
- if (objv[1]->typePtr == &tclEnsembleCmdType) {
+ if (objv[1]->typePtr == &ensembleCmdType) {
EnsembleCmdRep *ensembleCmd = (EnsembleCmdRep *)
objv[1]->internalRep.otherValuePtr;
if (ensembleCmd->nsPtr == ensemblePtr->nsPtr &&
@@ -6152,7 +6152,7 @@ MakeCachedEnsembleCommand(objPtr, ensemblePtr, subcommandName, prefixObjPtr)
register EnsembleCmdRep *ensembleCmd;
int length;
- if (objPtr->typePtr == &tclEnsembleCmdType) {
+ if (objPtr->typePtr == &ensembleCmdType) {
ensembleCmd = (EnsembleCmdRep *) objPtr->internalRep.otherValuePtr;
Tcl_DecrRefCount(ensembleCmd->realPrefixObj);
ensembleCmd->nsPtr->refCount--;
@@ -6169,7 +6169,7 @@ MakeCachedEnsembleCommand(objPtr, ensemblePtr, subcommandName, prefixObjPtr)
TclFreeIntRep(objPtr);
ensembleCmd = (EnsembleCmdRep *) ckalloc(sizeof(EnsembleCmdRep));
objPtr->internalRep.otherValuePtr = (VOID *) ensembleCmd;
- objPtr->typePtr = &tclEnsembleCmdType;
+ objPtr->typePtr = &ensembleCmdType;
}
/*
@@ -6596,7 +6596,7 @@ DupEnsembleCmdRep(objPtr, copyPtr)
ckalloc(sizeof(EnsembleCmdRep));
int length = strlen(ensembleCmd->fullSubcmdName);
- copyPtr->typePtr = &tclEnsembleCmdType;
+ copyPtr->typePtr = &ensembleCmdType;
copyPtr->internalRep.otherValuePtr = (VOID *) ensembleCopy;
ensembleCopy->nsPtr = ensembleCmd->nsPtr;
ensembleCopy->epoch = ensembleCmd->epoch;
diff --git a/generic/tclProc.c b/generic/tclProc.c
index cd53cff..b3d85c4 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.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: tclProc.c,v 1.76 2005/06/02 03:11:37 dgp Exp $
+ * RCS: @(#) $Id: tclProc.c,v 1.77 2005/06/07 21:46:18 dgp Exp $
*/
#include "tclInt.h"
@@ -55,7 +55,7 @@ Tcl_ObjType tclProcBodyType = {
* string rep; it's just a cache type.
*/
-Tcl_ObjType tclLevelReferenceType = {
+static Tcl_ObjType levelReferenceType = {
"levelReference",
NULL, NULL, NULL, NULL
};
@@ -650,7 +650,7 @@ TclObjGetFrame(interp, objPtr, framePtrPtr)
result = 1;
curLevel = (iPtr->varFramePtr == NULL) ? 0 : iPtr->varFramePtr->level;
- if (objPtr->typePtr == &tclLevelReferenceType) {
+ if (objPtr->typePtr == &levelReferenceType) {
if ((int) objPtr->internalRep.twoPtrValue.ptr1) {
level = curLevel - (int) objPtr->internalRep.twoPtrValue.ptr2;
} else {
@@ -674,7 +674,7 @@ TclObjGetFrame(interp, objPtr, framePtrPtr)
* Cache for future reference.
*/
TclFreeIntRep(objPtr);
- objPtr->typePtr = &tclLevelReferenceType;
+ objPtr->typePtr = &levelReferenceType;
objPtr->internalRep.twoPtrValue.ptr1 = (VOID *) 0;
objPtr->internalRep.twoPtrValue.ptr2 = (VOID *) level;
} else if (isdigit(UCHAR(*name))) { /* INTL: digit */
@@ -685,7 +685,7 @@ TclObjGetFrame(interp, objPtr, framePtrPtr)
* Cache for future reference.
*/
TclFreeIntRep(objPtr);
- objPtr->typePtr = &tclLevelReferenceType;
+ objPtr->typePtr = &levelReferenceType;
objPtr->internalRep.twoPtrValue.ptr1 = (VOID *) 1;
objPtr->internalRep.twoPtrValue.ptr2 = (VOID *) level;
level = curLevel - level;
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 6cdedc9..58de446 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclVar.c,v 1.106 2005/05/10 18:34:52 kennykb Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.107 2005/06/07 21:46:19 dgp Exp $
*/
#include "tclInt.h"
@@ -94,7 +94,7 @@ static Tcl_SetFromAnyProc PanicOnSetVarName;
* it is a scalar variable
*/
-Tcl_ObjType tclLocalVarNameType = {
+static Tcl_ObjType localVarNameType = {
"localVarName",
NULL, DupLocalVarName, PanicOnUpdateVarName, PanicOnSetVarName
};
@@ -324,7 +324,7 @@ TclLookupVar(interp, part1, part2, flags, msg, createPart1, createPart2,
* Side effects:
* New hashtable entries may be created if createPart1 or createPart2
* are 1.
- * The object part1Ptr is converted to one of tclLocalVarNameType,
+ * The object part1Ptr is converted to one of localVarNameType,
* tclNsVarNameType or tclParsedVarNameType and caches as much of the
* lookup as it can.
*
@@ -400,7 +400,7 @@ TclObjLookupVar(interp, part1Ptr, part2, flags, msg, createPart1, createPart2,
goto doParse;
}
- if (typePtr == &tclLocalVarNameType) {
+ if (typePtr == &localVarNameType) {
int localIndex = (int) part1Ptr->internalRep.longValue;
if ((varFramePtr != NULL)
@@ -544,7 +544,7 @@ TclObjLookupVar(interp, part1Ptr, part2, flags, msg, createPart1, createPart2,
* An indexed local variable.
*/
- part1Ptr->typePtr = &tclLocalVarNameType;
+ part1Ptr->typePtr = &localVarNameType;
part1Ptr->internalRep.longValue = (long) index;
#if ENABLE_NS_VARNAME_CACHING
} else if (index > -3) {
@@ -4585,7 +4585,7 @@ DupLocalVarName(srcPtr, dupPtr)
Tcl_Obj *dupPtr;
{
dupPtr->internalRep.longValue = srcPtr->internalRep.longValue;
- dupPtr->typePtr = &tclLocalVarNameType;
+ dupPtr->typePtr = &localVarNameType;
}
#if ENABLE_NS_VARNAME_CACHING