summaryrefslogtreecommitdiffstats
path: root/generic/tkTextIndex.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-26 12:18:40 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-26 12:18:40 (GMT)
commitfb81bb7d6255f5040661d59559edf32bc997bd6d (patch)
treee4c799bd7715375437a5ca9333297d2092c73630 /generic/tkTextIndex.c
parent54a771e501da6a4560e298e70c348ae4c3961e7f (diff)
downloadtk-fb81bb7d6255f5040661d59559edf32bc997bd6d.zip
tk-fb81bb7d6255f5040661d59559edf32bc997bd6d.tar.gz
tk-fb81bb7d6255f5040661d59559edf32bc997bd6d.tar.bz2
Remove unneeded SetOptionFromAny and SetTextIndexFromAny. They were only needed to prevent a panic in Tcl, but Tcl now generates a nice error-message in stead of panicing.
Diffstat (limited to 'generic/tkTextIndex.c')
-rw-r--r--generic/tkTextIndex.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c
index fc97412..55a4907 100644
--- a/generic/tkTextIndex.c
+++ b/generic/tkTextIndex.c
@@ -48,8 +48,6 @@ static int GetIndex(Tcl_Interp *interp, TkSharedText *sharedPtr,
static void DupTextIndexInternalRep(Tcl_Obj *srcPtr,
Tcl_Obj *copyPtr);
static void FreeTextIndexInternalRep(Tcl_Obj *listPtr);
-static int SetTextIndexFromAny(Tcl_Interp *interp,
- Tcl_Obj *objPtr);
static void UpdateStringOfTextIndex(Tcl_Obj *objPtr);
/*
@@ -75,7 +73,7 @@ const Tcl_ObjType tkTextIndexType = {
FreeTextIndexInternalRep, /* freeIntRepProc */
DupTextIndexInternalRep, /* dupIntRepProc */
NULL, /* updateStringProc */
- SetTextIndexFromAny /* setFromAnyProc */
+ NULL /* setFromAnyProc */
};
static void
@@ -142,18 +140,6 @@ UpdateStringOfTextIndex(
strcpy(objPtr->bytes, buffer);
objPtr->length = len;
}
-
-static int
-SetTextIndexFromAny(
- Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- Tcl_Obj *objPtr) /* The object to convert. */
-{
- Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "can't convert value to textindex except via"
- " TkTextGetIndexFromObj API", -1));
- Tcl_SetErrorCode(interp, "TK", "API_ABUSE", NULL);
- return TCL_ERROR;
-}
/*
*---------------------------------------------------------------------------