diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-04-09 10:47:23 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-04-09 10:47:23 (GMT) |
commit | e7e43c5c186742cef2848e0d2064b0bd3053dd3d (patch) | |
tree | 09834b535f136d7ce1c1e396e868476b9bb99ade /generic/tclInterp.c | |
parent | a6bcd8c3740026e20a6fc44e5bc449a43d9f701e (diff) | |
parent | c8e29e275f91c0c265cee4657911201e0718e812 (diff) | |
download | tcl-e7e43c5c186742cef2848e0d2064b0bd3053dd3d.zip tcl-e7e43c5c186742cef2848e0d2064b0bd3053dd3d.tar.gz tcl-e7e43c5c186742cef2848e0d2064b0bd3053dd3d.tar.bz2 |
Rebase to 9.0
Diffstat (limited to 'generic/tclInterp.c')
-rw-r--r-- | generic/tclInterp.c | 66 |
1 files changed, 2 insertions, 64 deletions
diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 5127936..3579e9b 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -1276,68 +1276,6 @@ Tcl_CreateAliasObj( /* *---------------------------------------------------------------------- * - * Tcl_GetAlias -- - * - * Gets information about an alias. - * - * Results: - * A standard Tcl result. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -int -Tcl_GetAlias( - Tcl_Interp *interp, /* Interp to start search from. */ - const char *aliasName, /* Name of alias to find. */ - Tcl_Interp **targetInterpPtr, - /* (Return) target interpreter. */ - const char **targetNamePtr, /* (Return) name of target command. */ - int *argcPtr, /* (Return) count of addnl args. */ - const char ***argvPtr) /* (Return) additional arguments. */ -{ - InterpInfo *iiPtr = (InterpInfo *) ((Interp *) interp)->interpInfo; - Tcl_HashEntry *hPtr; - Alias *aliasPtr; - int i, objc; - Tcl_Obj **objv; - - hPtr = Tcl_FindHashEntry(&iiPtr->child.aliasTable, aliasName); - if (hPtr == NULL) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "alias \"%s\" not found", aliasName)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ALIAS", aliasName, (char *)NULL); - return TCL_ERROR; - } - aliasPtr = (Alias *)Tcl_GetHashValue(hPtr); - objc = aliasPtr->objc; - objv = &aliasPtr->objPtr; - - if (targetInterpPtr != NULL) { - *targetInterpPtr = aliasPtr->targetInterp; - } - if (targetNamePtr != NULL) { - *targetNamePtr = TclGetString(objv[0]); - } - if (argcPtr != NULL) { - *argcPtr = objc - 1; - } - if (argvPtr != NULL) { - *argvPtr = (const char **) - Tcl_Alloc(sizeof(const char *) * (objc - 1)); - for (i = 1; i < objc; i++) { - (*argvPtr)[i - 1] = TclGetString(objv[i]); - } - } - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * * Tcl_GetAliasObj -- * * Object version: Gets information about an alias. @@ -1358,13 +1296,13 @@ Tcl_GetAliasObj( Tcl_Interp **targetInterpPtr, /* (Return) target interpreter. */ const char **targetNamePtr, /* (Return) name of target command. */ - int *objcPtr, /* (Return) count of addnl args. */ + Tcl_Size *objcPtr, /* (Return) count of addnl args. */ Tcl_Obj ***objvPtr) /* (Return) additional args. */ { InterpInfo *iiPtr = (InterpInfo *) ((Interp *) interp)->interpInfo; Tcl_HashEntry *hPtr; Alias *aliasPtr; - int objc; + Tcl_Size objc; Tcl_Obj **objv; hPtr = Tcl_FindHashEntry(&iiPtr->child.aliasTable, aliasName); |