summaryrefslogtreecommitdiffstats
path: root/generic/tkConfig.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/tkConfig.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/tkConfig.c')
-rw-r--r--generic/tkConfig.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/generic/tkConfig.c b/generic/tkConfig.c
index 3be882f..e06d5d5 100644
--- a/generic/tkConfig.c
+++ b/generic/tkConfig.c
@@ -128,7 +128,6 @@ static Option * GetOptionFromObj(Tcl_Interp *interp,
Tcl_Obj *objPtr, OptionTable *tablePtr);
static int ObjectIsEmpty(Tcl_Obj *objPtr);
static void FreeOptionInternalRep(Tcl_Obj *objPtr);
-static int SetOptionFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr);
/*
* The structure below defines an object type that is used to cache the result
@@ -142,7 +141,7 @@ static const Tcl_ObjType optionObjType = {
FreeOptionInternalRep, /* freeIntRepProc */
NULL, /* dupIntRepProc */
NULL, /* updateStringProc */
- SetOptionFromAny /* setFromAnyProc */
+ NULL /* setFromAnyProc */
};
/*
@@ -1204,38 +1203,6 @@ TkGetOptionSpec(
/*
*----------------------------------------------------------------------
*
- * SetOptionFromAny --
- *
- * This function is called to convert a Tcl object to option internal
- * form. However, this doesn't make sense (need to have a table of
- * options 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
-SetOptionFromAny(
- Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- register Tcl_Obj *objPtr) /* The object to convert. */
-{
- Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "can't convert value to option except via GetOptionFromObj API",
- -1));
- Tcl_SetErrorCode(interp, "TK", "API_ABUSE", NULL);
- return TCL_ERROR;
-}
-
-/*
- *----------------------------------------------------------------------
- *
* FreeOptionInternalRep --
*
* Part of the option Tcl object type implementation. Frees the storage