diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-07-08 10:28:48 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-07-08 10:28:48 (GMT) |
commit | f84ad84e4153f7bdce3247e5f5ab7477e74db51f (patch) | |
tree | 2b8995478cfb59e408b65de66a7a0c682f23bca7 /generic/tclUtil.c | |
parent | 72476cdd50825cebaea367188325e69ea5a8ff40 (diff) | |
download | tcl-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/tclUtil.c')
-rw-r--r-- | generic/tclUtil.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 553593c..f0c7f77 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -1968,7 +1968,7 @@ Tcl_ConcatObj( if (TclListObjIsCanonical(objPtr)) { continue; } - Tcl_GetStringFromObj(objPtr, &length); + TclGetStringFromObj(objPtr, &length); if (length > 0) { break; } @@ -2677,7 +2677,7 @@ TclDStringAppendObj( Tcl_Obj *objPtr) { int length; - char *bytes = Tcl_GetStringFromObj(objPtr, &length); + char *bytes = TclGetStringFromObj(objPtr, &length); return Tcl_DStringAppend(dsPtr, bytes, length); } @@ -4000,7 +4000,7 @@ TclSetProcessGlobalValue( } else { Tcl_CreateExitHandler(FreeProcessGlobalValue, pgvPtr); } - bytes = Tcl_GetStringFromObj(newValue, &pgvPtr->numBytes); + bytes = TclGetStringFromObj(newValue, &pgvPtr->numBytes); pgvPtr->value = ckalloc(pgvPtr->numBytes + 1); memcpy(pgvPtr->value, bytes, (unsigned) pgvPtr->numBytes + 1); if (pgvPtr->encoding) { |