summaryrefslogtreecommitdiffstats
path: root/generic/tclLiteral.c
diff options
context:
space:
mode:
authornijtmans <nijtmans@noemail.net>2009-02-10 22:49:41 (GMT)
committernijtmans <nijtmans@noemail.net>2009-02-10 22:49:41 (GMT)
commit228226b45f89df593f47066d1f2add74e5422610 (patch)
treeca3baf5495ef51e4e0ad8aa5ed4221b784f68ae6 /generic/tclLiteral.c
parentab9feb37566d10eecd1f998f2b01445ceca39839 (diff)
downloadtcl-228226b45f89df593f47066d1f2add74e5422610.zip
tcl-228226b45f89df593f47066d1f2add74e5422610.tar.gz
tcl-228226b45f89df593f47066d1f2add74e5422610.tar.bz2
- eliminate some unnessary type casts
- some internal const decorations - spacing FossilOrigin-Name: 160bcb11525977fb1ee14ae1e09ba9cb60b29920
Diffstat (limited to 'generic/tclLiteral.c')
-rw-r--r--generic/tclLiteral.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c
index a176e8d..ccee1c4 100644
--- a/generic/tclLiteral.c
+++ b/generic/tclLiteral.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclLiteral.c,v 1.34 2009/01/09 11:21:46 dkf Exp $
+ * RCS: @(#) $Id: tclLiteral.c,v 1.35 2009/02/10 22:49:50 nijtmans Exp $
*/
#include "tclInt.h"
@@ -221,7 +221,7 @@ TclDeleteLiteralTable(
* Find, or if necessary create, an object in the interpreter's literal
* table that has a string representation matching the argument
* string. If nsPtr!=NULL then only literals stored for the namespace are
- * considered.
+ * considered.
*
* Results:
* The literal object. If it was created in this call *newPtr is set to
@@ -255,7 +255,7 @@ TclCreateLiteral(
LiteralEntry *globalPtr;
int globalHash;
Tcl_Obj *objPtr;
-
+
/*
* Is it in the interpreter's global literal table?
*/
@@ -508,7 +508,7 @@ TclLookupLiteralEntry(
Interp *iPtr = (Interp *) interp;
LiteralTable *globalTablePtr = &(iPtr->literalTable);
register LiteralEntry *entryPtr;
- char *bytes;
+ const char *bytes;
int length, globalHash;
bytes = TclGetStringFromObj(objPtr, &length);
@@ -554,7 +554,7 @@ TclHideLiteral(
LiteralEntry **nextPtrPtr, *entryPtr, *lPtr;
LiteralTable *localTablePtr = &(envPtr->localLitTable);
int localHash, length;
- char *bytes;
+ const char *bytes;
Tcl_Obj *newObjPtr;
lPtr = &(envPtr->literalArrayPtr[index]);
@@ -770,7 +770,7 @@ ExpandLocalLiteralArray(
if (currArrayPtr != newArrayPtr) {
for (i=0 ; i<currElems ; i++) {
if (newArrayPtr[i].nextPtr != NULL) {
- newArrayPtr[i].nextPtr = newArrayPtr
+ newArrayPtr[i].nextPtr = newArrayPtr
+ (newArrayPtr[i].nextPtr - currArrayPtr);
}
}
@@ -818,7 +818,7 @@ TclReleaseLiteral(
Interp *iPtr = (Interp *) interp;
LiteralTable *globalTablePtr = &(iPtr->literalTable);
register LiteralEntry *entryPtr, *prevPtr;
- char *bytes;
+ const char *bytes;
int length, index;
bytes = TclGetStringFromObj(objPtr, &length);
@@ -942,7 +942,7 @@ RebuildLiteralTable(
register LiteralEntry **oldChainPtr, **newChainPtr;
register LiteralEntry *entryPtr;
LiteralEntry **bucketPtr;
- char *bytes;
+ const char *bytes;
int oldSize, count, index, length;
oldSize = tablePtr->numBuckets;