Another place where we can use a faster string construction technique
This commit is contained in:
@@ -1330,10 +1330,15 @@ TclOOLinkObjCmd(
|
||||
}
|
||||
|
||||
// Qualify the source if necessary
|
||||
const char *srcStr = TclGetString(src);
|
||||
Tcl_Size srcLen;
|
||||
const char *srcStr = TclGetStringFromObj(src, &srcLen);
|
||||
if (srcStr[0] != ':' || srcStr[1] != ':') {
|
||||
src = Tcl_ObjPrintf("%s::%s",
|
||||
context->oPtr->namespacePtr->fullName, srcStr);
|
||||
Tcl_DString ds;
|
||||
Tcl_DStringInit(&ds);
|
||||
Tcl_DStringAppend(&ds, context->oPtr->namespacePtr->fullName, -1);
|
||||
TclDStringAppendLiteral(&ds, "::");
|
||||
Tcl_DStringAppend(&ds, srcStr, srcLen);
|
||||
src = Tcl_DStringToObj(&ds);
|
||||
}
|
||||
|
||||
// Make the alias command
|
||||
|
||||
Reference in New Issue
Block a user