From 51c192d71c89343815510f453d25f163850e9341 Mon Sep 17 00:00:00 2001 From: jenglish Date: Mon, 2 Jul 2012 17:38:52 +0000 Subject: ttk::*: Ensure that all tables passed to Tcl_GetIndexFromObj{Struct} are statically allocated. Caught by Michael Kirkham. --- generic/ttk/ttkImage.c | 2 +- generic/ttk/ttkPanedwindow.c | 2 +- win/ttkWinXPTheme.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/ttk/ttkImage.c b/generic/ttk/ttkImage.c index c3b55e9..2b12864 100644 --- a/generic/ttk/ttkImage.c +++ b/generic/ttk/ttkImage.c @@ -314,7 +314,7 @@ Ttk_CreateImageElement( const char *elementName, int objc, Tcl_Obj *const objv[]) { - const char *optionStrings[] = + static const char *optionStrings[] = { "-border","-height","-padding","-sticky","-width",NULL }; enum { O_BORDER, O_HEIGHT, O_PADDING, O_STICKY, O_WIDTH }; diff --git a/generic/ttk/ttkPanedwindow.c b/generic/ttk/ttkPanedwindow.c index 065774e..b301372 100644 --- a/generic/ttk/ttkPanedwindow.c +++ b/generic/ttk/ttkPanedwindow.c @@ -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 }; + static const char *whatTable[] = { "element", "sash", NULL }; enum { IDENTIFY_ELEMENT, IDENTIFY_SASH }; int what = IDENTIFY_SASH; Paned *pw = recordPtr; diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c index e2f916f..fda7b04 100644 --- a/win/ttkWinXPTheme.c +++ b/win/ttkWinXPTheme.c @@ -1109,7 +1109,7 @@ Ttk_CreateVsapiElement( LPWSTR wname; Ttk_ElementSpec *elementSpec = &GenericElementSpec; - const char *optionStrings[] = + static const char *optionStrings[] = { "-padding","-width","-height","-margins", "-syssize", "-halfheight", "-halfwidth", NULL }; enum { O_PADDING, O_WIDTH, O_HEIGHT, O_MARGINS, O_SYSSIZE, -- cgit v0.12