summaryrefslogtreecommitdiffstats
path: root/generic/tclLiteral.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2009-02-10 22:49:42 (GMT)
committernijtmans <nijtmans>2009-02-10 22:49:42 (GMT)
commitb07274fff759a29a06f8c988c019d09d583fe435 (patch)
treeca3baf5495ef51e4e0ad8aa5ed4221b784f68ae6 /generic/tclLiteral.c
parent9968eece0a412b8035a5437db0e8c52723c94e7f (diff)
downloadtcl-b07274fff759a29a06f8c988c019d09d583fe435.zip
tcl-b07274fff759a29a06f8c988c019d09d583fe435.tar.gz
tcl-b07274fff759a29a06f8c988c019d09d583fe435.tar.bz2
- eliminate some unnessary type casts
- some internal const decorations - spacing
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;