diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-02-06 21:20:00 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-02-06 21:20:00 (GMT) |
commit | cb2f9cccfbc8007a93a1010bbabe4614939b94a2 (patch) | |
tree | 4ed530aa1e22b15e16d2ee4df6473338fec4407f /generic | |
parent | 346aa04836d20ec950e8f1a1f322c008c42c081f (diff) | |
download | tcl-cb2f9cccfbc8007a93a1010bbabe4614939b94a2.zip tcl-cb2f9cccfbc8007a93a1010bbabe4614939b94a2.tar.gz tcl-cb2f9cccfbc8007a93a1010bbabe4614939b94a2.tar.bz2 |
Some more complient API changes
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tcl.decls | 2 | ||||
-rw-r--r-- | generic/tclBasic.c | 6 | ||||
-rw-r--r-- | generic/tclDecls.h | 4 | ||||
-rw-r--r-- | generic/tclInt.h | 4 | ||||
-rw-r--r-- | generic/tclParse.c | 5 |
5 files changed, 11 insertions, 10 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls index 7c52cd4..d19e722 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -1056,7 +1056,7 @@ declare 290 { void Tcl_DiscardResult(Tcl_SavedResult *statePtr) } declare 291 { - int Tcl_EvalEx(Tcl_Interp *interp, const char *script, int numBytes, + int Tcl_EvalEx(Tcl_Interp *interp, const char *script, size_t numBytes, int flags) } declare 292 { diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 42a1ccf..716b054 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -4537,7 +4537,7 @@ Tcl_EvalEx( Tcl_Interp *interp, /* Interpreter in which to evaluate the * script. Also used for error reporting. */ const char *script, /* First character of script to evaluate. */ - int numBytes, /* Number of bytes in script. If < 0, the + size_t numBytes, /* Number of bytes in script. If (size_t)-1, the * script consists of all bytes up to the * first null character. */ int flags) /* Collection of OR-ed bits that control the @@ -4552,7 +4552,7 @@ TclEvalEx( Tcl_Interp *interp, /* Interpreter in which to evaluate the * script. Also used for error reporting. */ const char *script, /* First character of script to evaluate. */ - int numBytes, /* Number of bytes in script. If < 0, the + size_t numBytes, /* Number of bytes in script. If (size_t)-1, the * script consists of all bytes up to the * first NUL character. */ int flags, /* Collection of OR-ed bits that control the @@ -4617,7 +4617,7 @@ TclEvalEx( } } - if (numBytes < 0) { + if (numBytes == (size_t)-1) { numBytes = strlen(script); } Tcl_ResetResult(interp); diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 636c63a..1fd4f3a 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -850,7 +850,7 @@ EXTERN void Tcl_DeleteThreadExitHandler(Tcl_ExitProc *proc, EXTERN void Tcl_DiscardResult(Tcl_SavedResult *statePtr); /* 291 */ EXTERN int Tcl_EvalEx(Tcl_Interp *interp, const char *script, - int numBytes, int flags); + size_t numBytes, int flags); /* 292 */ EXTERN int Tcl_EvalObjv(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags); @@ -2103,7 +2103,7 @@ typedef struct TclStubs { void (*tcl_CreateThreadExitHandler) (Tcl_ExitProc *proc, void *clientData); /* 288 */ void (*tcl_DeleteThreadExitHandler) (Tcl_ExitProc *proc, void *clientData); /* 289 */ void (*tcl_DiscardResult) (Tcl_SavedResult *statePtr); /* 290 */ - int (*tcl_EvalEx) (Tcl_Interp *interp, const char *script, int numBytes, int flags); /* 291 */ + int (*tcl_EvalEx) (Tcl_Interp *interp, const char *script, size_t numBytes, int flags); /* 291 */ int (*tcl_EvalObjv) (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags); /* 292 */ int (*tcl_EvalObjEx) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); /* 293 */ TCL_NORETURN void (*tcl_ExitThread) (int status); /* 294 */ diff --git a/generic/tclInt.h b/generic/tclInt.h index 3d44545..d2bf8ab 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -2864,7 +2864,7 @@ MODULE_SCOPE int TclFindDictElement(Tcl_Interp *interp, size_t *sizePtr, int *literalPtr); /* TIP #280 - Modified token based evaluation, with line information. */ MODULE_SCOPE int TclEvalEx(Tcl_Interp *interp, const char *script, - int numBytes, int flags, int line, + size_t numBytes, int flags, int line, int *clNextOuter, const char *outerScript); MODULE_SCOPE Tcl_ObjCmdProc TclFileAttrsCmd; MODULE_SCOPE Tcl_ObjCmdProc TclFileCopyCmd; @@ -3025,7 +3025,7 @@ MODULE_SCOPE int TclParseNumber(Tcl_Interp *interp, Tcl_Obj *objPtr, const char *expected, const char *bytes, int numBytes, const char **endPtrPtr, int flags); MODULE_SCOPE void TclParseInit(Tcl_Interp *interp, const char *string, - int numBytes, Tcl_Parse *parsePtr); + size_t numBytes, Tcl_Parse *parsePtr); MODULE_SCOPE int TclParseAllWhiteSpace(const char *src, int numBytes); MODULE_SCOPE int TclProcessReturn(Tcl_Interp *interp, int code, int level, Tcl_Obj *returnOpts); diff --git a/generic/tclParse.c b/generic/tclParse.c index b012222a..ca10b89 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -190,7 +190,7 @@ void TclParseInit( Tcl_Interp *interp, /* Interpreter to use for error reporting */ const char *start, /* Start of string to be parsed. */ - int numBytes, /* Total number of bytes in string. If < 0, + size_t numBytes, /* Total number of bytes in string. If (size_t)-1, * the script consists of all bytes up to the * first null character. */ Tcl_Parse *parsePtr) /* Points to struct to initialize */ @@ -420,7 +420,8 @@ Tcl_ParseCommand( tokenPtr->size = src - tokenPtr->start; tokenPtr->numComponents = parsePtr->numTokens - (wordIndex + 1); if (expandWord) { - int i, isLiteral = 1; + size_t i; + int isLiteral = 1; /* * When a command includes a word that is an expanded literal; for |