diff options
author | dgp <dgp@users.sourceforge.net> | 2014-12-22 20:27:14 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-12-22 20:27:14 (GMT) |
commit | a4001c9841d6451aa215a7387bf4a439b11a18fb (patch) | |
tree | c21abe18af5192fe68d7241c7e1215ee9474377c /generic/tclCompile.h | |
parent | a11afffa9f17e5c95a97d579ce36b386363c0133 (diff) | |
download | tcl-a4001c9841d6451aa215a7387bf4a439b11a18fb.zip tcl-a4001c9841d6451aa215a7387bf4a439b11a18fb.tar.gz tcl-a4001c9841d6451aa215a7387bf4a439b11a18fb.tar.bz2 |
Convert the LocalScalar*() macros to rest on TclPushVarName rather than on
TclIsLocalScalar().
Diffstat (limited to 'generic/tclCompile.h')
-rw-r--r-- | generic/tclCompile.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 51f0b34..c6c7a7c 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -1151,6 +1151,10 @@ MODULE_SCOPE void TclFinalizeLoopExceptionRange(CompileEnv *envPtr, MODULE_SCOPE char * TclLiteralStats(LiteralTable *tablePtr); MODULE_SCOPE int TclLog2(int value); #endif +MODULE_SCOPE int TclLocalScalar(const char *bytes, int numBytes, + CompileEnv *envPtr); +MODULE_SCOPE int TclLocalScalarFromToken(Tcl_Token *tokenPtr, + CompileEnv *envPtr); MODULE_SCOPE void TclOptimizeBytecode(void *envPtr); #ifdef TCL_COMPILE_DEBUG MODULE_SCOPE void TclPrintByteCodeObj(Tcl_Interp *interp, @@ -1678,11 +1682,9 @@ MODULE_SCOPE int TclPushProcCallFrame(ClientData clientData, #define AnonymousLocal(envPtr) \ (TclFindCompiledLocal(NULL, /*nameChars*/ 0, /*create*/ 1, (envPtr))) #define LocalScalar(chars,len,envPtr) \ - (!TclIsLocalScalar((chars), (len)) ? -1 : \ - TclFindCompiledLocal((chars), (len), /*create*/ 1, (envPtr))) + TclLocalScalar(chars, len, envPtr) #define LocalScalarFromToken(tokenPtr,envPtr) \ - ((tokenPtr)->type != TCL_TOKEN_SIMPLE_WORD ? -1 : \ - LocalScalar((tokenPtr)[1].start, (tokenPtr)[1].size, (envPtr))) + TclLocalScalarFromToken(tokenPtr, envPtr) /* * Flags bits used by TclPushVarName. |