summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-04-12 18:17:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-04-12 18:17:43 (GMT)
commite4749b5f325ab29ff28f2e3223df5f6db91c2e42 (patch)
treee0d2a9199b1f0ac266d0660a80625cc96103870b
parent83677a47e7b79ee7a64d2053ed2871b850898a2e (diff)
downloadtcl-e4749b5f325ab29ff28f2e3223df5f6db91c2e42.zip
tcl-e4749b5f325ab29ff28f2e3223df5f6db91c2e42.tar.gz
tcl-e4749b5f325ab29ff28f2e3223df5f6db91c2e42.tar.bz2
Some more int -> Tcl_Size (which is actually the same in 8.7). Backported from 9.0
-rw-r--r--generic/tclTest.c42
-rw-r--r--generic/tclTestObj.c2
-rw-r--r--generic/tclThreadTest.c13
-rw-r--r--win/Makefile.in6
4 files changed, 36 insertions, 27 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 5e882d1..893f073 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -2063,7 +2063,7 @@ static int UtfExtWrapper(
int result;
int flags;
Tcl_Obj **flagObjs;
- int nflags;
+ Tcl_Size nflags;
static const struct {
const char *flagKey;
int flag;
@@ -2078,7 +2078,7 @@ static int UtfExtWrapper(
{"profilereplace", TCL_ENCODING_PROFILE_REPLACE},
{NULL, 0}
};
- int i;
+ Tcl_Size i;
Tcl_WideInt wide;
if (objc < 7 || objc > 10) {
@@ -2453,7 +2453,8 @@ TestevalexObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int length, flags;
+ int flags;
+ Tcl_Size length;
const char *script;
flags = 0;
@@ -3691,7 +3692,8 @@ TestlinkarrayCmd(
TCL_LINK_FLOAT, TCL_LINK_DOUBLE, TCL_LINK_STRING, TCL_LINK_CHARS,
TCL_LINK_BINARY
};
- int optionIndex, typeIndex, readonly, i, size, length;
+ int optionIndex, typeIndex, readonly, i, size;
+ Tcl_Size length;
char *name, *arg;
Tcl_WideInt addr;
@@ -4036,7 +4038,8 @@ TestparserObjCmd(
Tcl_Obj *const objv[]) /* The argument objects. */
{
const char *script;
- int length, dummy;
+ Tcl_Size dummy;
+ int length;
Tcl_Parse parse;
if (objc != 3) {
@@ -4092,7 +4095,8 @@ TestexprparserObjCmd(
Tcl_Obj *const objv[]) /* The argument objects. */
{
const char *script;
- int length, dummy;
+ Tcl_Size dummy;
+ int length;
Tcl_Parse parse;
if (objc != 3) {
@@ -4281,7 +4285,8 @@ TestparsevarnameObjCmd(
Tcl_Obj *const objv[]) /* The argument objects. */
{
const char *script;
- int append, length, dummy;
+ int length, append;
+ Tcl_Size dummy;
Tcl_Parse parse;
if (objc != 4) {
@@ -4414,7 +4419,8 @@ TestregexpObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int i, ii, indices, stringLength, match, about;
+ int i, indices, match, about;
+ Tcl_Size stringLength, ii;
int hasxflags, cflags, eflags;
Tcl_RegExp regExpr;
const char *string;
@@ -4527,7 +4533,7 @@ TestregexpObjCmd(
if (objc > 2 && (cflags&REG_EXPECT) && indices) {
const char *varName;
const char *value;
- int start, end;
+ Tcl_Size start, end;
char resinfo[TCL_INTEGER_SPACE * 2];
varName = Tcl_GetString(objv[2]);
@@ -4567,7 +4573,7 @@ TestregexpObjCmd(
Tcl_RegExpGetInfo(regExpr, &info);
for (i = 0; i < objc; i++) {
- int start, end;
+ Tcl_Size start, end;
Tcl_Obj *newPtr, *varPtr, *valuePtr;
varPtr = objv[i];
@@ -5568,7 +5574,7 @@ TeststringbytesObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
- int n;
+ Tcl_Size n;
const unsigned char *p;
if (objc != 2) {
@@ -6956,10 +6962,10 @@ static int
TestWrongNumArgsObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int i, length;
+ Tcl_Size i, length;
const char *msg;
if (objc < 3) {
@@ -7474,7 +7480,7 @@ static Tcl_Obj *
SimpleRedirect(
Tcl_Obj *pathPtr) /* Name of file to copy. */
{
- int len;
+ Tcl_Size len;
const char *str;
Tcl_Obj *origPtr;
@@ -7667,7 +7673,7 @@ TestUtfPrevCmd(
int objc,
Tcl_Obj *const objv[])
{
- int numBytes, offset;
+ Tcl_Size numBytes, offset;
char *bytes;
const char *result;
@@ -7708,7 +7714,7 @@ TestNumUtfCharsCmd(
Tcl_Obj *const objv[])
{
if (objc > 1) {
- int numBytes, len, limit = TCL_INDEX_NONE;
+ Tcl_Size numBytes, len, limit = TCL_INDEX_NONE;
const char *bytes = Tcl_GetStringFromObj(objv[1], &numBytes);
if (objc > 2) {
@@ -7776,7 +7782,7 @@ TestGetIntForIndexCmd(
int objc,
Tcl_Obj *const objv[])
{
- int result;
+ Tcl_Size result;
Tcl_WideInt endvalue;
if (objc != 3) {
@@ -8654,7 +8660,7 @@ static int
InterpCompiledVarResolver(
TCL_UNUSED(Tcl_Interp *),
const char *name,
- TCL_UNUSED(int) /* length */,
+ TCL_UNUSED(Tcl_Size) /* length */,
TCL_UNUSED(Tcl_Namespace *),
Tcl_ResolvedVarInfo **rPtr)
{
diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c
index 6c056da..0f5f21f 100644
--- a/generic/tclTestObj.c
+++ b/generic/tclTestObj.c
@@ -907,7 +907,7 @@ TestlistobjCmd(
Tcl_Size first; /* First index in the list */
Tcl_Size count; /* Count of elements in a list */
Tcl_Obj **varPtr;
- int i, len;
+ Tcl_Size i, len;
if (objc < 3) {
Tcl_WrongNumArgs(interp, 1, objv, "option arg ?arg...?");
diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c
index 22887df..44d2b0e 100644
--- a/generic/tclThreadTest.c
+++ b/generic/tclThreadTest.c
@@ -273,7 +273,8 @@ ThreadObjCmd(
}
case THREAD_CREATE: {
const char *script;
- int joinable, len;
+ int joinable;
+ Tcl_Size len;
if (objc == 2) {
/*
@@ -608,7 +609,7 @@ NewTestThread(
*/
Tcl_Preserve(tsdPtr->interp);
- result = Tcl_EvalEx(tsdPtr->interp, threadEvalScript, -1, 0);
+ result = Tcl_EvalEx(tsdPtr->interp, threadEvalScript, TCL_INDEX_NONE, 0);
if (result != TCL_OK) {
ThreadErrorProc(tsdPtr->interp);
}
@@ -655,10 +656,10 @@ ThreadErrorProc(
errorInfo = Tcl_GetVar2(interp, "errorInfo", NULL, TCL_GLOBAL_ONLY);
if (errorProcString == NULL) {
errChannel = Tcl_GetStdChannel(TCL_STDERR);
- Tcl_WriteChars(errChannel, "Error from thread ", -1);
- Tcl_WriteChars(errChannel, buf, -1);
+ Tcl_WriteChars(errChannel, "Error from thread ", TCL_INDEX_NONE);
+ Tcl_WriteChars(errChannel, buf, TCL_INDEX_NONE);
Tcl_WriteChars(errChannel, "\n", 1);
- Tcl_WriteChars(errChannel, errorInfo, -1);
+ Tcl_WriteChars(errChannel, errorInfo, TCL_INDEX_NONE);
Tcl_WriteChars(errChannel, "\n", 1);
} else {
argv[0] = errorProcString;
@@ -983,7 +984,7 @@ ThreadCancel(
Tcl_MutexUnlock(&threadMutex);
Tcl_ResetResult(interp);
return Tcl_CancelEval(tsdPtr->interp,
- (result != NULL) ? Tcl_NewStringObj(result, -1) : NULL, 0, flags);
+ (result != NULL) ? Tcl_NewStringObj(result, TCL_INDEX_NONE) : NULL, 0, flags);
}
/*
diff --git a/win/Makefile.in b/win/Makefile.in
index a5cd90e..6c92749 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -82,7 +82,7 @@ CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
#CFLAGS = $(CFLAGS_DEBUG)
#CFLAGS = $(CFLAGS_OPTIMIZE)
#CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE)
-CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -D__USE_MINGW_ANSI_STDIO=0 -DMP_FIXED_CUTOFFS -DMP_NO_STDINT
+CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -DMP_FIXED_CUTOFFS -D__USE_MINGW_ANSI_STDIO=0 -DMP_NO_STDINT
# To compile without backward compatibility and deprecated code uncomment the
# following
@@ -545,7 +545,7 @@ $(TCLSH): $(TCLSH_OBJS) @LIBRARIES@ $(TCL_STUB_LIB_FILE) tclsh.$(RES) ${TCL_ZIP_
tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE)
$(COPY) tclsh.exe.manifest $(TCLSH).manifest
@VC_MANIFEST_EMBED_EXE@
- if test "${ZIPFS_BUILD}" = "2" ; then \
+ @if test "${ZIPFS_BUILD}" = "2" ; then \
cat ${TCL_ZIP_FILE} >> ${TCLSH}; \
${NATIVE_ZIP} -A ${TCLSH} \
|| echo 'ignore zip-error by adjust sfx process (not executable?)'; \
@@ -683,6 +683,8 @@ tclPkgConfig.${OBJEXT}: tclPkgConfig.c
tclEvent.${OBJEXT}: tclEvent.c tclUuid.h
+tclTest.${OBJEXT}: tclTest.c tclUuid.h
+
$(TOP_DIR)/manifest.uuid:
printf "git-" >$(TOP_DIR)/manifest.uuid
(cd $(TOP_DIR); git rev-parse HEAD >>$(TOP_DIR)/manifest.uuid || \