summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-07-08 10:28:48 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-07-08 10:28:48 (GMT)
commitf84ad84e4153f7bdce3247e5f5ab7477e74db51f (patch)
tree2b8995478cfb59e408b65de66a7a0c682f23bca7 /generic/tclCompile.c
parent72476cdd50825cebaea367188325e69ea5a8ff40 (diff)
downloadtcl-f84ad84e4153f7bdce3247e5f5ab7477e74db51f.zip
tcl-f84ad84e4153f7bdce3247e5f5ab7477e74db51f.tar.gz
tcl-f84ad84e4153f7bdce3247e5f5ab7477e74db51f.tar.bz2
Micro-optimization: Use TclGetStringFromObj in stead of Tcl_GetStringFromObj in many places where possible.
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index b1b67a8..0024f1e 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -1314,7 +1314,7 @@ CompileSubstObj(
if (objPtr->typePtr != &substCodeType) {
CompileEnv compEnv;
int numBytes;
- const char *bytes = Tcl_GetStringFromObj(objPtr, &numBytes);
+ const char *bytes = TclGetStringFromObj(objPtr, &numBytes);
/* TODO: Check for more TIP 280 */
TclInitCompileEnv(interp, &compEnv, bytes, numBytes, NULL, 0);
@@ -1792,7 +1792,7 @@ CompileCmdLiteral(
CompileEnv *envPtr)
{
int numBytes;
- const char *bytes = Tcl_GetStringFromObj(cmdObj, &numBytes);
+ const char *bytes = TclGetStringFromObj(cmdObj, &numBytes);
int cmdLitIdx = TclRegisterNewCmdLiteral(envPtr, bytes, numBytes);
Command *cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, cmdObj);
@@ -2729,7 +2729,7 @@ PreventCycle(
* the intrep.
*/
int numBytes;
- const char *bytes = Tcl_GetStringFromObj(objPtr, &numBytes);
+ const char *bytes = TclGetStringFromObj(objPtr, &numBytes);
Tcl_Obj *copyPtr = Tcl_NewStringObj(bytes, numBytes);
Tcl_IncrRefCount(copyPtr);
@@ -2968,7 +2968,7 @@ TclFindCompiledLocal(
varNamePtr = &cachePtr->varName0;
for (i=0; i < cachePtr->numVars; varNamePtr++, i++) {
if (*varNamePtr) {
- localName = Tcl_GetStringFromObj(*varNamePtr, &len);
+ localName = TclGetStringFromObj(*varNamePtr, &len);
if ((len == nameBytes) && !strncmp(name, localName, len)) {
return i;
}