diff options
author | dgp <dgp@users.sourceforge.net> | 2020-03-06 20:32:47 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2020-03-06 20:32:47 (GMT) |
commit | 2cd124a28ea369d484197163cccb49acedc5e288 (patch) | |
tree | 398b722a0dc929bb17e5ddab775b65ac267b1c0f /generic/tclIndexObj.c | |
parent | 9cc797aba7f6ef3f4caf90cb11ba7ce76f103f88 (diff) | |
download | tcl-2cd124a28ea369d484197163cccb49acedc5e288.zip tcl-2cd124a28ea369d484197163cccb49acedc5e288.tar.gz tcl-2cd124a28ea369d484197163cccb49acedc5e288.tar.bz2 |
Remove SetIndexFromAny(), a useless routine that can only be reached via
unsupported shenanigans.
Diffstat (limited to 'generic/tclIndexObj.c')
-rw-r--r-- | generic/tclIndexObj.c | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 30c33f1..ba02453 100644 --- a/generic/tclIndexObj.c +++ b/generic/tclIndexObj.c @@ -22,7 +22,6 @@ static int GetIndexFromObjList(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Obj *tableObjPtr, const char *msg, int flags, int *indexPtr); -static int SetIndexFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); static void UpdateStringOfIndex(Tcl_Obj *objPtr); static void DupIndex(Tcl_Obj *srcPtr, Tcl_Obj *dupPtr); static void FreeIndex(Tcl_Obj *objPtr); @@ -48,7 +47,7 @@ static const Tcl_ObjType indexType = { FreeIndex, /* freeIntRepProc */ DupIndex, /* dupIntRepProc */ UpdateStringOfIndex, /* updateStringProc */ - SetIndexFromAny /* setFromAnyProc */ + NULL /* setFromAnyProc */ }; /* @@ -397,39 +396,6 @@ Tcl_GetIndexFromObjStruct( /* *---------------------------------------------------------------------- * - * SetIndexFromAny -- - * - * This function is called to convert a Tcl object to index internal - * form. However, this doesn't make sense (need to have a table of - * keywords in order to do the conversion) so the function always - * generates an error. - * - * Results: - * The return value is always TCL_ERROR, and an error message is left in - * interp's result if interp isn't NULL. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -static int -SetIndexFromAny( - Tcl_Interp *interp, /* Used for error reporting if not NULL. */ - register Tcl_Obj *objPtr) /* The object to convert. */ -{ - if (interp) { - Tcl_SetObjResult(interp, Tcl_NewStringObj( - "can't convert value to index except via Tcl_GetIndexFromObj API", - -1)); - } - return TCL_ERROR; -} - -/* - *---------------------------------------------------------------------- - * * UpdateStringOfIndex -- * * This function is called to convert a Tcl object from index internal |