From f21f6c00e18c6a1acd5c854f3bb6dd3430740af5 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 5 Feb 2010 17:42:21 +0000 Subject: Make the various stub tables and hook pointers const, just as Tcl and Tk. Make more internal tables "const" --- ChangeLog | 25 +++++++++++++++++++++---- generic/ttk/ttk.decls | 4 ++-- generic/ttk/ttkButton.c | 4 ++-- generic/ttk/ttkDecls.h | 4 ++-- generic/ttk/ttkDefaultTheme.c | 4 ++-- generic/ttk/ttkEntry.c | 6 +++--- generic/ttk/ttkGenStubs.tcl | 29 ++++++++++++++++++++++------- generic/ttk/ttkImage.c | 4 ++-- generic/ttk/ttkInit.c | 15 ++++++++------- generic/ttk/ttkLayout.c | 6 +++--- generic/ttk/ttkNotebook.c | 6 +++--- generic/ttk/ttkPanedwindow.c | 4 ++-- generic/ttk/ttkProgress.c | 4 ++-- generic/ttk/ttkStubInit.c | 6 +++--- generic/ttk/ttkStubLib.c | 6 +++--- generic/ttk/ttkTheme.c | 4 ++-- generic/ttk/ttkTreeview.c | 14 +++++++------- generic/ttk/ttkWidget.c | 4 ++-- generic/ttk/ttkWidget.h | 8 ++++---- 19 files changed, 95 insertions(+), 62 deletions(-) diff --git a/ChangeLog b/ChangeLog index 553c35b..417da6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,10 +2,27 @@ * generic/ttk/ttkGenStubs.tcl: Follow-up to [2010-01-29] commit: prevent space within stub table function parameters - if the parameter type is a pointer. - * generic/ttk/ttkDecls.h (re-generated) - * generic/tk*Decls.h - + if the parameter type is a pointer. Make the + various stub tables and hook pointers const, + just as Tcl and Tk. + * generic/ttk/ttkDecls.h (regenerated) + * generic/ttk/ttkStubInit.c (regenerated) + * generic/ttk/ttk.decls Minor formatting + * generic/ttk/ttkButton.c Make more internal tables "const" + * generic/ttk/ttkDefaultTheme.c + * generic/ttk/ttkEntry.c + * generic/ttk/ttkImage.c + * generic/ttk/ttkInit.c + * generic/ttk/ttkLayout.c + * generic/ttk/ttkNotebook.c + * generic/ttk/ttkPanedWindow.c + * generic/ttk/ttkProgress.c + * generic/ttk/ttkStubLib.c + * generic/ttk/ttkTheme.c + * generic/ttk/ttkTreeview.c + * generic/ttk/ttkWidget.c + * generic/ttk/ttkWidget.h + 2010-01-31 Joe English * generic/ttk/ttkTheme.h, generic/ttk/ttkWidget.h, diff --git a/generic/ttk/ttk.decls b/generic/ttk/ttk.decls index db244ce..d18d5a8 100644 --- a/generic/ttk/ttk.decls +++ b/generic/ttk/ttk.decls @@ -1,5 +1,5 @@ # -# $Id: ttk.decls,v 1.4 2009/02/08 19:35:35 jenglish Exp $ +# $Id: ttk.decls,v 1.5 2010/02/05 17:42:21 nijtmans Exp $ # library ttk @@ -64,7 +64,7 @@ declare 10 current { } declare 11 current { Tcl_Obj *Ttk_NewStateSpecObj( - unsigned int onbits,unsigned int offbits); + unsigned int onbits, unsigned int offbits); } declare 12 current { Ttk_StateMap Ttk_GetStateMapFromObj( diff --git a/generic/ttk/ttkButton.c b/generic/ttk/ttkButton.c index 30818b1..1510a1e 100644 --- a/generic/ttk/ttkButton.c +++ b/generic/ttk/ttkButton.c @@ -1,4 +1,4 @@ -/* $Id: ttkButton.c,v 1.12 2010/01/31 22:50:55 jenglish Exp $ +/* $Id: ttkButton.c,v 1.13 2010/02/05 17:42:21 nijtmans Exp $ * Copyright (c) 2003, Joe English * * label, button, checkbutton, radiobutton, and menubutton widgets. @@ -784,7 +784,7 @@ typedef struct /* * Option specifications: */ -static const char *directionStrings[] = { +static const char *const directionStrings[] = { "above", "below", "left", "right", "flush", NULL }; static Tk_OptionSpec MenubuttonOptionSpecs[] = diff --git a/generic/ttk/ttkDecls.h b/generic/ttk/ttkDecls.h index a931c39..650fd86 100644 --- a/generic/ttk/ttkDecls.h +++ b/generic/ttk/ttkDecls.h @@ -1,5 +1,5 @@ /* - * $Id: ttkDecls.h,v 1.10 2010/02/05 10:56:43 nijtmans Exp $ + * $Id: ttkDecls.h,v 1.11 2010/02/05 17:42:21 nijtmans Exp $ * * This file is (mostly) automatically generated from ttk.decls. */ @@ -139,7 +139,7 @@ typedef struct TtkStubs { int magic; int epoch; int revision; - struct TtkStubHooks *hooks; + const struct TtkStubHooks *hooks; Ttk_Theme (*ttk_GetTheme) (Tcl_Interp *interp, const char *name); /* 0 */ Ttk_Theme (*ttk_GetDefaultTheme) (Tcl_Interp *interp); /* 1 */ diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c index 4cc05a4..4d3729a 100644 --- a/generic/ttk/ttkDefaultTheme.c +++ b/generic/ttk/ttkDefaultTheme.c @@ -1,4 +1,4 @@ -/* $Id: ttkDefaultTheme.c,v 1.15 2010/01/22 14:17:53 nijtmans Exp $ +/* $Id: ttkDefaultTheme.c,v 1.16 2010/02/05 17:42:21 nijtmans Exp $ * * Copyright (c) 2003, Joe English * @@ -682,7 +682,7 @@ typedef struct { Tcl_Obj *colorObj; } MenubuttonArrowElement; -static const char *directionStrings[] = { /* See also: button.c */ +static const char *const directionStrings[] = { /* See also: button.c */ "above", "below", "left", "right", "flush", NULL }; enum { POST_ABOVE, POST_BELOW, POST_LEFT, POST_RIGHT, POST_FLUSH }; diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c index 18591b6..58c2c35 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -1,5 +1,5 @@ /* - * $Id: ttkEntry.c,v 1.19 2010/01/31 22:50:55 jenglish Exp $ + * $Id: ttkEntry.c,v 1.20 2010/02/05 17:42:21 nijtmans Exp $ * * DERIVED FROM: tk/generic/tkEntry.c r1.35. * @@ -33,7 +33,7 @@ typedef enum validateMode { VMODE_ALL, VMODE_KEY, VMODE_FOCUS, VMODE_FOCUSIN, VMODE_FOCUSOUT, VMODE_NONE } VMODE; -static const char *validateStrings[] = { +static const char *const validateStrings[] = { "all", "key", "focus", "focusin", "focusout", "none", NULL }; @@ -46,7 +46,7 @@ typedef enum validateReason { VALIDATE_FORCED } VREASON; -static const char *validateReasonStrings[] = { +static const char *const validateReasonStrings[] = { "key", "key", "focusin", "focusout", "forced", NULL }; diff --git a/generic/ttk/ttkGenStubs.tcl b/generic/ttk/ttkGenStubs.tcl index 9adbcc9..3575847 100644 --- a/generic/ttk/ttkGenStubs.tcl +++ b/generic/ttk/ttkGenStubs.tcl @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# $Id: ttkGenStubs.tcl,v 1.4 2010/02/05 10:56:43 nijtmans Exp $ +# $Id: ttkGenStubs.tcl,v 1.5 2010/02/05 17:42:21 nijtmans Exp $ # # SOURCE: tcl/tools/genStubs.tcl, revision 1.20 # @@ -730,7 +730,7 @@ proc genStubs::emitHeader {name} { foreach hook $hooks($name) { set capHook [string toupper [string index $hook 0]] append capHook [string range $hook 1 end] - append text " struct ${capHook}Stubs *${hook}Stubs;\n" + append text " const struct ${capHook}Stubs *${hook}Stubs;\n" } append text "} ${capName}StubHooks;\n" } @@ -738,7 +738,7 @@ proc genStubs::emitHeader {name} { append text " int magic;\n" append text " int epoch;\n" append text " int revision;\n" - append text " struct ${capName}StubHooks *hooks;\n\n" + append text " const struct ${capName}StubHooks *hooks;\n\n" emitSlots $name text @@ -767,25 +767,40 @@ proc genStubs::emitHeader {name} { proc genStubs::emitInit {name textVar} { variable hooks + variable interfaces variable epoch variable revision upvar $textVar text + set root 1 set capName [string toupper [string index $name 0]] append capName [string range $name 1 end] set CAPName [string toupper $name] if {[info exists hooks($name)]} { - append text "\nstatic ${capName}StubHooks ${name}StubHooks = \{\n" + append text "\nstatic const ${capName}StubHooks ${name}StubHooks = \{\n" set sep " " foreach sub $hooks($name) { - append text $sep "&${sub}Stubs" + append text $sep "&${sub}ConstStubs" set sep ",\n " } append text "\n\};\n" } - append text "\n${capName}Stubs ${name}Stubs = \{\n" + foreach intf [array names interfaces] { + if {[info exists hooks($intf)]} { + if {$name in $hooks($intf)} { + set root 0 + break; + } + } + } + + if {$root} { + append text "\nconst ${capName}Stubs ${name}ConstStubs = \{\n" + } else { + append text "\nstatic const ${capName}Stubs ${name}ConstStubs = \{\n" + } append text " TCL_STUB_MAGIC,\n" append text " ${CAPName}_STUBS_EPOCH,\n" append text " ${CAPName}_STUBS_REVISION,\n" @@ -794,7 +809,7 @@ proc genStubs::emitInit {name textVar} { } else { append text " 0,\n" } - + forAllStubs $name makeInit noGuard text {" 0, /* $i */\n"} append text "\};\n" diff --git a/generic/ttk/ttkImage.c b/generic/ttk/ttkImage.c index 8c50485..859c4a8 100644 --- a/generic/ttk/ttkImage.c +++ b/generic/ttk/ttkImage.c @@ -1,4 +1,4 @@ -/* $Id: ttkImage.c,v 1.8 2008/04/27 22:41:12 dkf Exp $ +/* $Id: ttkImage.c,v 1.9 2010/02/05 17:42:21 nijtmans Exp $ * Image specifications and image element factory. * * Copyright (C) 2004 Pat Thoyts @@ -314,7 +314,7 @@ Ttk_CreateImageElement( const char *elementName, int objc, Tcl_Obj *const objv[]) { - const char *optionStrings[] = + const char *const optionStrings[] = { "-border","-height","-padding","-sticky","-width",NULL }; enum { O_BORDER, O_HEIGHT, O_PADDING, O_STICKY, O_WIDTH }; diff --git a/generic/ttk/ttkInit.c b/generic/ttk/ttkInit.c index 1bdf0dd..218faf1 100644 --- a/generic/ttk/ttkInit.c +++ b/generic/ttk/ttkInit.c @@ -1,4 +1,4 @@ -/* $Id: ttkInit.c,v 1.10 2010/01/22 14:17:53 nijtmans Exp $ +/* $Id: ttkInit.c,v 1.11 2010/02/05 17:42:21 nijtmans Exp $ * Copyright (c) 2003, Joe English * * Ttk package: initialization routine and miscellaneous utilities. @@ -13,7 +13,7 @@ * Legal values for the button -default option. * See also: enum Ttk_ButtonDefaultState. */ -const char *ttkDefaultStrings[] = { +const char *const ttkDefaultStrings[] = { "normal", "active", "disabled", NULL }; @@ -29,7 +29,7 @@ int Ttk_GetButtonDefaultStateFromObj( * Legal values for the -compound option. * See also: enum Ttk_Compound. */ -const char *ttkCompoundStrings[] = { +const char *const ttkCompoundStrings[] = { "none", "text", "image", "center", "top", "bottom", "left", "right", NULL }; @@ -46,7 +46,7 @@ int Ttk_GetCompoundFromObj( * Legal values for the -orient option. * See also: enum Ttk_Orient. */ -const char *ttkOrientStrings[] = { +const char *const ttkOrientStrings[] = { "horizontal", "vertical", NULL }; @@ -62,7 +62,7 @@ int Ttk_GetOrientFromObj( * Recognized values for the -state compatibility option. * Other options are accepted and interpreted as synonyms for "normal". */ -static const char *ttkStateStrings[] = { +static const char *const ttkStateStrings[] = { "normal", "readonly", "disabled", "active", NULL }; enum { @@ -259,7 +259,7 @@ static void RegisterThemes(Tcl_Interp *interp) * Ttk initialization. */ -extern TtkStubs ttkStubs; +extern const TtkStubs ttkConstStubs; MODULE_SCOPE int Ttk_Init(Tcl_Interp *interp) @@ -276,7 +276,8 @@ Ttk_Init(Tcl_Interp *interp) Ttk_PlatformInit(interp); - Tcl_PkgProvideEx(interp, "Ttk", TTK_PATCH_LEVEL, (void*)&ttkStubs); + Tcl_PkgProvideEx(interp, "Ttk", TTK_PATCH_LEVEL, + (ClientData) &ttkConstStubs); return TCL_OK; } diff --git a/generic/ttk/ttkLayout.c b/generic/ttk/ttkLayout.c index 7e8ad96..4085614 100644 --- a/generic/ttk/ttkLayout.c +++ b/generic/ttk/ttkLayout.c @@ -5,7 +5,7 @@ * * Copyright (c) 2003 Joe English. Freely redistributable. * - * $Id: ttkLayout.c,v 1.16 2009/02/09 01:45:46 jenglish Exp $ + * $Id: ttkLayout.c,v 1.17 2010/02/05 17:42:21 nijtmans Exp $ */ #include @@ -605,13 +605,13 @@ Ttk_InstantiateLayout(Ttk_Theme theme, Ttk_TemplateNode *op) */ /* NB: This must match bit definitions TTK_PACK_LEFT etc. */ -static const char *packSideStrings[] = +static const char *const packSideStrings[] = { "left", "right", "top", "bottom", NULL }; Ttk_LayoutTemplate Ttk_ParseLayoutTemplate(Tcl_Interp *interp, Tcl_Obj *objPtr) { enum { OP_SIDE, OP_STICKY, OP_EXPAND, OP_BORDER, OP_UNIT, OP_CHILDREN }; - static const char *optStrings[] = { + static const char *const optStrings[] = { "-side", "-sticky", "-expand", "-border", "-unit", "-children", 0 }; int i = 0, objc; diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c index 5088d1e..e6fdace 100644 --- a/generic/ttk/ttkNotebook.c +++ b/generic/ttk/ttkNotebook.c @@ -1,4 +1,4 @@ -/* $Id: ttkNotebook.c,v 1.23 2010/01/31 22:50:55 jenglish Exp $ +/* $Id: ttkNotebook.c,v 1.24 2010/02/05 17:42:21 nijtmans Exp $ * Copyright (c) 2004, Joe English */ @@ -20,7 +20,7 @@ #define DEFAULT_MIN_TAB_WIDTH 24 -static const char *TabStateStrings[] = { "normal", "disabled", "hidden", 0 }; +static const char *const TabStateStrings[] = { "normal", "disabled", "hidden", 0 }; typedef enum { TAB_STATE_NORMAL, TAB_STATE_DISABLED, TAB_STATE_HIDDEN } TAB_STATE; @@ -1046,7 +1046,7 @@ static int NotebookHideCommand( static int NotebookIdentifyCommand( void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { - static const char *whatTable[] = { "element", "tab", NULL }; + static const char *const whatTable[] = { "element", "tab", NULL }; enum { IDENTIFY_ELEMENT, IDENTIFY_TAB }; int what = IDENTIFY_ELEMENT; Notebook *nb = recordPtr; diff --git a/generic/ttk/ttkPanedwindow.c b/generic/ttk/ttkPanedwindow.c index be9e549..21afebe 100644 --- a/generic/ttk/ttkPanedwindow.c +++ b/generic/ttk/ttkPanedwindow.c @@ -1,4 +1,4 @@ -/* $Id: ttkPanedwindow.c,v 1.20 2010/01/31 22:50:56 jenglish Exp $ +/* $Id: ttkPanedwindow.c,v 1.21 2010/02/05 17:42:21 nijtmans Exp $ * * Copyright (c) 2005, Joe English. Freely redistributable. * @@ -713,7 +713,7 @@ static int PanedForgetCommand( static int PanedIdentifyCommand( void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { - const char *whatTable[] = { "element", "sash", NULL }; + const char *const whatTable[] = { "element", "sash", NULL }; enum { IDENTIFY_ELEMENT, IDENTIFY_SASH }; int what = IDENTIFY_SASH; Paned *pw = recordPtr; diff --git a/generic/ttk/ttkProgress.c b/generic/ttk/ttkProgress.c index 679cc0b..0ea3576 100644 --- a/generic/ttk/ttkProgress.c +++ b/generic/ttk/ttkProgress.c @@ -1,4 +1,4 @@ -/* $Id: ttkProgress.c,v 1.9 2010/01/31 22:50:56 jenglish Exp $ +/* $Id: ttkProgress.c,v 1.10 2010/02/05 17:42:21 nijtmans Exp $ * * Copyright (c) Joe English, Pat Thoyts, Michael Kirkham * @@ -19,7 +19,7 @@ enum { TTK_PROGRESSBAR_DETERMINATE, TTK_PROGRESSBAR_INDETERMINATE }; -static const char *ProgressbarModeStrings[] = { +static const char *const ProgressbarModeStrings[] = { "determinate", "indeterminate", NULL }; diff --git a/generic/ttk/ttkStubInit.c b/generic/ttk/ttkStubInit.c index 11b60f9..56c7696 100644 --- a/generic/ttk/ttkStubInit.c +++ b/generic/ttk/ttkStubInit.c @@ -1,5 +1,5 @@ /* - * $Id: ttkStubInit.c,v 1.2 2006/11/03 03:06:22 das Exp $ + * $Id: ttkStubInit.c,v 1.3 2010/02/05 17:42:21 nijtmans Exp $ * * This file is (mostly) automatically generated from ttk.decls. * It is compiled and linked in with the ttk package proper. @@ -8,11 +8,11 @@ #include "tk.h" #include "ttkTheme.h" -MODULE_SCOPE TtkStubs ttkStubs; +MODULE_SCOPE const TtkStubs ttkConstStubs; /* !BEGIN!: Do not edit below this line. */ -TtkStubs ttkStubs = { +const TtkStubs ttkConstStubs = { TCL_STUB_MAGIC, TTK_STUBS_EPOCH, TTK_STUBS_REVISION, diff --git a/generic/ttk/ttkStubLib.c b/generic/ttk/ttkStubLib.c index 5087a18..0b180d9 100644 --- a/generic/ttk/ttkStubLib.c +++ b/generic/ttk/ttkStubLib.c @@ -1,5 +1,5 @@ /* - * $Id: ttkStubLib.c,v 1.6 2008/04/02 21:31:58 das Exp $ + * $Id: ttkStubLib.c,v 1.7 2010/02/05 17:42:21 nijtmans Exp $ * SOURCE: tk/generic/tkStubLib.c, version 1.9 2004/03/17 */ @@ -42,9 +42,9 @@ TtkInitializeStubs( const char *packageName = "Ttk"; const char *errMsg = NULL; ClientData pkgClientData = NULL; - const char *actualVersion= Tcl_PkgRequireEx( + const char *actualVersion = Tcl_PkgRequireEx( interp, packageName, version, exact, &pkgClientData); - TtkStubs *stubsPtr = pkgClientData; + const TtkStubs *stubsPtr = pkgClientData; if (!actualVersion) { return NULL; diff --git a/generic/ttk/ttkTheme.c b/generic/ttk/ttkTheme.c index 6bc3e42..d0c9174 100644 --- a/generic/ttk/ttkTheme.c +++ b/generic/ttk/ttkTheme.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * $Id: ttkTheme.c,v 1.20 2010/01/31 22:50:56 jenglish Exp $ + * $Id: ttkTheme.c,v 1.21 2010/02/05 17:42:21 nijtmans Exp $ */ #include @@ -1372,7 +1372,7 @@ static int StyleThemeCreateCmd( ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { StylePackageData *pkgPtr = clientData; - static const char *optStrings[] = + static const char *const optStrings[] = { "-parent", "-settings", NULL }; enum { OP_PARENT, OP_SETTINGS }; Ttk_Theme parentTheme = pkgPtr->defaultTheme, newTheme; diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c index 617aabf..ece8e3a 100644 --- a/generic/ttk/ttkTreeview.c +++ b/generic/ttk/ttkTreeview.c @@ -1,4 +1,4 @@ -/* $Id: ttkTreeview.c,v 1.34 2010/01/31 22:50:56 jenglish Exp $ +/* $Id: ttkTreeview.c,v 1.35 2010/02/05 17:42:21 nijtmans Exp $ * Copyright (c) 2004, Joe English * * ttk::treeview widget implementation. @@ -321,14 +321,14 @@ static Tk_OptionSpec HeadingOptionSpecs[] = { #define DEFAULT_SHOW "tree headings" -static const char *showStrings[] = { +static const char *const showStrings[] = { "tree", "headings", NULL }; static int GetEnumSetFromObj( Tcl_Interp *interp, Tcl_Obj *objPtr, - const char *table[], + const char *const table[], unsigned *resultPtr) { unsigned result = 0; @@ -434,7 +434,7 @@ typedef struct { #define SCROLLCMD_CHANGED (USER_MASK<<2) #define SHOW_CHANGED (USER_MASK<<3) -static const char *SelectModeStrings[] = { "none", "browse", "extended", NULL }; +static const char *const SelectModeStrings[] = { "none", "browse", "extended", NULL }; static Tk_OptionSpec TreeviewOptionSpecs[] = { WIDGET_TAKES_FOCUS, @@ -1506,7 +1506,7 @@ typedef enum { REGION_CELL } TreeRegion; -static const char *regionStrings[] = { +static const char *const regionStrings[] = { "nothing", "heading", "separator", "tree", "cell", 0 }; @@ -2253,7 +2253,7 @@ done: static int TreeviewIdentifyCommand( void *recordPtr, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) { - static const char *submethodStrings[] = + static const char *const submethodStrings[] = { "region", "item", "column", "row", "element", NULL }; enum { I_REGION, I_ITEM, I_COLUMN, I_ROW, I_ELEMENT }; @@ -2910,7 +2910,7 @@ static int TreeviewSelectionCommand( enum { SELECTION_SET, SELECTION_ADD, SELECTION_REMOVE, SELECTION_TOGGLE }; - static const char *selopStrings[] = { + static const char *const selopStrings[] = { "set", "add", "remove", "toggle", NULL }; diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c index f6f3885..dbd88b0 100644 --- a/generic/ttk/ttkWidget.c +++ b/generic/ttk/ttkWidget.c @@ -1,4 +1,4 @@ -/* $Id: ttkWidget.c,v 1.24 2010/01/31 22:50:56 jenglish Exp $ +/* $Id: ttkWidget.c,v 1.25 2010/02/05 17:42:21 nijtmans Exp $ * Copyright (c) 2003, Joe English * * Core widget utilities. @@ -755,7 +755,7 @@ int TtkWidgetIdentifyCommand( { WidgetCore *corePtr = recordPtr; Ttk_Element element; - static const char *whatTable[] = { "element", NULL }; + static const char *const whatTable[] = { "element", NULL }; int x, y, what; if (objc < 4 || objc > 5) { diff --git a/generic/ttk/ttkWidget.h b/generic/ttk/ttkWidget.h index 0f86cc3..db15fd7 100644 --- a/generic/ttk/ttkWidget.h +++ b/generic/ttk/ttkWidget.h @@ -1,4 +1,4 @@ -/* $Id: ttkWidget.h,v 1.12 2010/01/31 22:50:56 jenglish Exp $ +/* $Id: ttkWidget.h,v 1.13 2010/02/05 17:42:21 nijtmans Exp $ * Copyright (c) 2003, Joe English * Helper routines for widget implementations. */ @@ -240,9 +240,9 @@ MODULE_SCOPE Tk_OptionSpec ttkCoreOptionSpecs[]; * String tables for widget resource specifications: */ -MODULE_SCOPE const char *ttkOrientStrings[]; -MODULE_SCOPE const char *ttkCompoundStrings[]; -MODULE_SCOPE const char *ttkDefaultStrings[]; +MODULE_SCOPE const char *const ttkOrientStrings[]; +MODULE_SCOPE const char *const ttkCompoundStrings[]; +MODULE_SCOPE const char *const ttkDefaultStrings[]; /* * ... other option types... -- cgit v0.12