diff options
Diffstat (limited to 'generic/tkOldConfig.c')
-rw-r--r-- | generic/tkOldConfig.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c index 0edf798..70e0152 100644 --- a/generic/tkOldConfig.c +++ b/generic/tkOldConfig.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkOldConfig.c,v 1.4 1999/04/21 21:53:27 rjohnson Exp $ + * RCS: @(#) $Id: tkOldConfig.c,v 1.5 1999/12/14 06:52:30 hobbs Exp $ */ #include "tkPort.h" @@ -125,7 +125,14 @@ Tk_ConfigureWidget(interp, tkwin, specs, argc, argv, widgRec, flags) */ for ( ; argc > 0; argc -= 2, argv += 2) { - specPtr = FindConfigSpec(interp, specs, *argv, needFlags, hateFlags); + char *arg; + + if (flags & TK_CONFIG_OBJS) { + arg = Tcl_GetStringFromObj((Tcl_Obj *) *argv, NULL); + } else { + arg = *argv; + } + specPtr = FindConfigSpec(interp, specs, arg, needFlags, hateFlags); if (specPtr == NULL) { return TCL_ERROR; } @@ -135,11 +142,16 @@ Tk_ConfigureWidget(interp, tkwin, specs, argc, argv, widgRec, flags) */ if (argc < 2) { - Tcl_AppendResult(interp, "value for \"", *argv, + Tcl_AppendResult(interp, "value for \"", arg, "\" missing", (char *) NULL); return TCL_ERROR; } - if (DoConfig(interp, tkwin, specPtr, argv[1], 0, widgRec) != TCL_OK) { + if (flags & TK_CONFIG_OBJS) { + arg = Tcl_GetString((Tcl_Obj *) argv[1]); + } else { + arg = argv[1]; + } + if (DoConfig(interp, tkwin, specPtr, arg, 0, widgRec) != TCL_OK) { char msg[100]; sprintf(msg, "\n (processing \"%.40s\" option)", |