summaryrefslogtreecommitdiffstats
path: root/generic/tkConfig.c
diff options
context:
space:
mode:
authorjan.nijtmans <jan.nijtmans@noemail.net>2013-02-26 12:18:40 (GMT)
committerjan.nijtmans <jan.nijtmans@noemail.net>2013-02-26 12:18:40 (GMT)
commitb339a6b37db0099b88e6b1da01813d91e6a72799 (patch)
treee4c799bd7715375437a5ca9333297d2092c73630 /generic/tkConfig.c
parent47b60d6c4800425b98f9a5a58550b7e35d24d678 (diff)
downloadtk-b339a6b37db0099b88e6b1da01813d91e6a72799.zip
tk-b339a6b37db0099b88e6b1da01813d91e6a72799.tar.gz
tk-b339a6b37db0099b88e6b1da01813d91e6a72799.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.
FossilOrigin-Name: b1a5b20004877817f041bffa49da86ff03e32850
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