summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-04-23 13:49:01 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-04-23 13:49:01 (GMT)
commit84e3fb460607d9f15c570f0f4b9b8e3a33b6c559 (patch)
tree4c44f674724aef22717e0efab79ff4896b96ac00
parent154f6e364d28d67ef3d2f09c4a991d46e53ad2d4 (diff)
parentab4c7318fd564b0196bd38b6573eb84c9d51e2d1 (diff)
downloadtcl-84e3fb460607d9f15c570f0f4b9b8e3a33b6c559.zip
tcl-84e3fb460607d9f15c570f0f4b9b8e3a33b6c559.tar.gz
tcl-84e3fb460607d9f15c570f0f4b9b8e3a33b6c559.tar.bz2
make some more internal tables const
-rw-r--r--generic/tclAssembly.c2
-rw-r--r--generic/tclIO.c2
-rw-r--r--generic/tclIOCmd.c4
-rw-r--r--generic/tclIndexObj.c2
-rw-r--r--generic/tclTest.c2
-rw-r--r--generic/tclTrace.c2
-rw-r--r--unix/tcl.m42
-rw-r--r--unix/tclUnixChan.c2
-rw-r--r--win/tclWinFCmd.c2
-rw-r--r--win/tclWinPipe.c2
-rw-r--r--win/tclWinReg.c2
-rw-r--r--win/tclWinTest.c2
12 files changed, 13 insertions, 13 deletions
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c
index 5b32ab0..02144a1 100644
--- a/generic/tclAssembly.c
+++ b/generic/tclAssembly.c
@@ -492,7 +492,7 @@ TalInstDesc TalInstructionTable[] = {
* The instructions must be in ascending order by numeric operation code.
*/
-static unsigned char NonThrowingByteCodes[] = {
+static const unsigned char NonThrowingByteCodes[] = {
INST_PUSH1, INST_PUSH4, INST_POP, INST_DUP, /* 1-4 */
INST_JUMP1, INST_JUMP4, /* 34-35 */
INST_END_CATCH, INST_PUSH_RESULT, INST_PUSH_RETURN_CODE, /* 70-72 */
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 082cf70..96e6de3 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -8856,7 +8856,7 @@ Tcl_FileEventObjCmd(
int modeIndex; /* Index of mode argument. */
int mask;
static const char *const modeOptions[] = {"readable", "writable", NULL};
- static int maskArray[] = {TCL_READABLE, TCL_WRITABLE};
+ static CONST int maskArray[] = {TCL_READABLE, TCL_WRITABLE};
if ((objc != 3) && (objc != 4)) {
Tcl_WrongNumArgs(interp, 1, objv, "channelId event ?script?");
diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c
index 349814a..b22d746 100644
--- a/generic/tclIOCmd.c
+++ b/generic/tclIOCmd.c
@@ -521,7 +521,7 @@ Tcl_SeekObjCmd(
static const char *const originOptions[] = {
"start", "current", "end", NULL
};
- static int modeArray[] = {SEEK_SET, SEEK_CUR, SEEK_END};
+ static CONST int modeArray[] = {SEEK_SET, SEEK_CUR, SEEK_END};
if ((objc != 3) && (objc != 4)) {
Tcl_WrongNumArgs(interp, 1, objv, "channelId offset ?origin?");
@@ -648,7 +648,7 @@ Tcl_CloseObjCmd(
static const char *const dirOptions[] = {
"read", "write", NULL
};
- static int dirArray[] = {TCL_CLOSE_READ, TCL_CLOSE_WRITE};
+ static const int dirArray[] = {TCL_CLOSE_READ, TCL_CLOSE_WRITE};
if ((objc != 2) && (objc != 3)) {
Tcl_WrongNumArgs(interp, 1, objv, "channelId ?direction?");
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index 8651542..b206b35 100644
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.c
@@ -1350,7 +1350,7 @@ PrintUsage(
register const Tcl_ArgvInfo *infoPtr;
int width, numSpaces;
#define NUM_SPACES 20
- static char spaces[] = " ";
+ static const char spaces[] = " ";
char tmp[TCL_DOUBLE_SPACE];
/*
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 37ec751..004fadc 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -3262,7 +3262,7 @@ TestlocaleCmd(
"ctype", "numeric", "time", "collate", "monetary",
"all", NULL
};
- static int lcTypes[] = {
+ static CONST int lcTypes[] = {
LC_CTYPE, LC_NUMERIC, LC_TIME, LC_COLLATE, LC_MONETARY,
LC_ALL
};
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index 2e38086..25abdff 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -113,7 +113,7 @@ static const char *const traceTypeOptions[] = {
static Tcl_TraceTypeObjCmd *const traceSubCmds[] = {
TraceExecutionObjCmd,
TraceCommandObjCmd,
- TraceVariableObjCmd,
+ TraceVariableObjCmd
};
/*
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 222c375..85b48fa 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -2088,7 +2088,7 @@ dnl # preprocessing tests use only CPPFLAGS.
SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}'])
AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [
UNSHARED_LIB_SUFFIX='${VERSION}.a'])
- DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)"
+ DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)"
AS_IF([test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""], [
LIB_SUFFIX=${SHARED_LIB_SUFFIX}
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index 866d77d..db137aa 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -981,7 +981,7 @@ TtyGetOptionProc(
# define TtyGetBaud(speed) ((int) (speed))
#else /* !DIRECT_BAUD */
-static struct {int baud; unsigned long speed;} speeds[] = {
+static CONST struct {int baud; unsigned long speed;} speeds[] = {
#ifdef B0
{0, B0},
#endif
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c
index fea9ddb..aa0d665 100644
--- a/win/tclWinFCmd.c
+++ b/win/tclWinFCmd.c
@@ -50,7 +50,7 @@ enum {
WIN_SYSTEM_ATTRIBUTE
};
-static int attributeArray[] = {FILE_ATTRIBUTE_ARCHIVE, FILE_ATTRIBUTE_HIDDEN,
+static const int attributeArray[] = {FILE_ATTRIBUTE_ARCHIVE, FILE_ATTRIBUTE_HIDDEN,
0, FILE_ATTRIBUTE_READONLY, 0, FILE_ATTRIBUTE_SYSTEM};
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index f1b18df..9664937 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -1290,7 +1290,7 @@ ApplicationType(
Tcl_DString nameBuf, ds;
const TCHAR *nativeName;
TCHAR nativeFullPath[MAX_PATH];
- static char extensions[][5] = {"", ".com", ".exe", ".bat"};
+ static const char extensions[][5] = {"", ".com", ".exe", ".bat"};
/*
* Look for the program as an external program. First try the name as it
diff --git a/win/tclWinReg.c b/win/tclWinReg.c
index 1390415..937089c 100644
--- a/win/tclWinReg.c
+++ b/win/tclWinReg.c
@@ -67,7 +67,7 @@ static const char *const rootKeyNames[] = {
"HKEY_PERFORMANCE_DATA", "HKEY_DYN_DATA", NULL
};
-static HKEY rootKeys[] = {
+static const HKEY rootKeys[] = {
HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CLASSES_ROOT, HKEY_CURRENT_USER,
HKEY_CURRENT_CONFIG, HKEY_PERFORMANCE_DATA, HKEY_DYN_DATA
};
diff --git a/win/tclWinTest.c b/win/tclWinTest.c
index 6ef1157..392e830 100644
--- a/win/tclWinTest.c
+++ b/win/tclWinTest.c
@@ -430,7 +430,7 @@ TestExceptionCmd(
"invalid_disp", "guard_page", "invalid_handle", "ctrl+c",
NULL
};
- static DWORD exceptions[] = {
+ static const DWORD exceptions[] = {
EXCEPTION_ACCESS_VIOLATION, EXCEPTION_DATATYPE_MISALIGNMENT,
EXCEPTION_ARRAY_BOUNDS_EXCEEDED, EXCEPTION_FLT_DENORMAL_OPERAND,
EXCEPTION_FLT_DIVIDE_BY_ZERO, EXCEPTION_FLT_INEXACT_RESULT,