summaryrefslogtreecommitdiffstats
path: root/generic/tkTextIndex.c
diff options
context:
space:
mode:
authornijtmans@users.sourceforge.net <jan.nijtmans>2013-02-26 12:18:40 (GMT)
committernijtmans@users.sourceforge.net <jan.nijtmans>2013-02-26 12:18:40 (GMT)
commite0aba3c919eec2aaf112a11e85cafba13f05ed31 (patch)
treee4c799bd7715375437a5ca9333297d2092c73630 /generic/tkTextIndex.c
parentccf01e3b1cf91b2df8592cfe1b5206b82dcdfe45 (diff)
downloadtk-e0aba3c919eec2aaf112a11e85cafba13f05ed31.zip
tk-e0aba3c919eec2aaf112a11e85cafba13f05ed31.tar.gz
tk-e0aba3c919eec2aaf112a11e85cafba13f05ed31.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;
-}
/*
*---------------------------------------------------------------------------