diff options
author | dgp <dgp@users.sourceforge.net> | 2023-04-24 15:51:00 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2023-04-24 15:51:00 (GMT) |
commit | e95eb576664ff39f992f9eb6af44c66c9d5c0c73 (patch) | |
tree | 5ed6d217322c1b7ea1475c1e0fe9070ee31d518f /generic | |
parent | 3a9a817f678320a821b13ebe5f2cec6aeab1ecca (diff) | |
download | tcl-e95eb576664ff39f992f9eb6af44c66c9d5c0c73.zip tcl-e95eb576664ff39f992f9eb6af44c66c9d5c0c73.tar.gz tcl-e95eb576664ff39f992f9eb6af44c66c9d5c0c73.tar.bz2 |
Adapt signature of TclCompileScript() to fit better after TIP 660.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCompile.c | 4 | ||||
-rw-r--r-- | generic/tclCompile.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 5da5cf1..9448241 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -2136,7 +2136,7 @@ TclCompileScript( * serves as context for finding and compiling * commands. May not be NULL. */ const char *script, /* The source script to compile. */ - size_t numBytes, /* Number of bytes in script. If -1, the + Tcl_Size numBytes, /* Number of bytes in script. If -1, the * script consists of all bytes up to the * first null character. */ CompileEnv *envPtr) /* Holds resulting instructions. */ @@ -2169,7 +2169,7 @@ TclCompileScript( /* Each iteration compiles one command from the script. */ - if (numBytes + 1 > 1) { + if (numBytes > 0) { /* * Don't use system stack (size of Tcl_Parse is ca. 400 bytes), so * many nested compilations (body enclosed in body) can cause abnormal diff --git a/generic/tclCompile.h b/generic/tclCompile.h index d82b8e3..22abb46 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -1100,7 +1100,7 @@ MODULE_SCOPE void TclCompileInvocation(Tcl_Interp *interp, Tcl_Token *tokenPtr, Tcl_Obj *cmdObj, size_t numWords, CompileEnv *envPtr); MODULE_SCOPE void TclCompileScript(Tcl_Interp *interp, - const char *script, size_t numBytes, + const char *script, Tcl_Size numBytes, CompileEnv *envPtr); MODULE_SCOPE void TclCompileSyntaxError(Tcl_Interp *interp, CompileEnv *envPtr); |