summaryrefslogtreecommitdiffstats
path: root/generic/tclCompExpr.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-04-23 12:30:28 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-04-23 12:30:28 (GMT)
commit6f14ff020a548ab6adcb30836c498ab0fe921970 (patch)
tree36a35c68a8d8f61e3b2e51e236b86513e4138025 /generic/tclCompExpr.c
parentbb146c387f42e478b1d8ffbc8617988fb572587c (diff)
downloadtcl-6f14ff020a548ab6adcb30836c498ab0fe921970.zip
tcl-6f14ff020a548ab6adcb30836c498ab0fe921970.tar.gz
tcl-6f14ff020a548ab6adcb30836c498ab0fe921970.tar.bz2
make some more internal tables const
On cygwin, install dll's in /usr/bin, not in /usr/lib
Diffstat (limited to 'generic/tclCompExpr.c')
-rw-r--r--generic/tclCompExpr.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c
index 68533c5..6bac221 100644
--- a/generic/tclCompExpr.c
+++ b/generic/tclCompExpr.c
@@ -101,19 +101,19 @@ static int opTableInitialized = 0; /* 0 means not yet initialized. */
TCL_DECLARE_MUTEX(opMutex)
typedef struct OperatorDesc {
- char *name; /* Name of the operator. */
+ CONST char *name; /* Name of the operator. */
int numOperands; /* Number of operands. 0 if the operator
* requires special handling. */
int instruction; /* Instruction opcode for the operator.
* Ignored if numOperands is 0. */
} OperatorDesc;
-static OperatorDesc operatorTable[] = {
+static CONST OperatorDesc operatorTable[] = {
{"*", 2, INST_MULT},
{"/", 2, INST_DIV},
{"%", 2, INST_MOD},
- {"+", 0},
- {"-", 0},
+ {"+", 0, 0},
+ {"-", 0, 0},
{"<<", 2, INST_LSHIFT},
{">>", 2, INST_RSHIFT},
{"<", 2, INST_LT},
@@ -125,14 +125,14 @@ static OperatorDesc operatorTable[] = {
{"&", 2, INST_BITAND},
{"^", 2, INST_BITXOR},
{"|", 2, INST_BITOR},
- {"&&", 0},
- {"||", 0},
- {"?", 0},
+ {"&&", 0, 0},
+ {"||", 0, 0},
+ {"?", 0, 0},
{"!", 1, INST_LNOT},
{"~", 1, INST_BITNOT},
{"eq", 2, INST_STR_EQ},
{"ne", 2, INST_STR_NEQ},
- {NULL}
+ {NULL, 0, 0}
};
/*
@@ -343,7 +343,7 @@ CompileSubExpr(exprTokenPtr, infoPtr, envPtr)
Tcl_Interp *interp = infoPtr->interp;
Tcl_Token *tokenPtr, *endPtr = NULL; /* silence gcc 4 warning */
Tcl_Token *afterSubexprPtr;
- OperatorDesc *opDescPtr;
+ CONST OperatorDesc *opDescPtr;
Tcl_HashEntry *hPtr;
CONST char *operator;
Tcl_DString opBuf;