summaryrefslogtreecommitdiffstats
path: root/generic/tkFont.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2008-10-15 06:41:06 (GMT)
committernijtmans <nijtmans>2008-10-15 06:41:06 (GMT)
commit61b16774d545ab31705be8fda1520731cb0075f7 (patch)
tree29f5c39636b7be9789e731887bc5a58b1b1ee2f3 /generic/tkFont.c
parentd7a70751627660bb7343dab5abda94a068388dd1 (diff)
downloadtk-61b16774d545ab31705be8fda1520731cb0075f7.zip
tk-61b16774d545ab31705be8fda1520731cb0075f7.tar.gz
tk-61b16774d545ab31705be8fda1520731cb0075f7.tar.bz2
Add "const" to many internal
const tables, so those will be put by the C-compiler in the TEXT segment in stead of the DATA segment. This makes those table sharable in shared libraries.
Diffstat (limited to 'generic/tkFont.c')
-rw-r--r--generic/tkFont.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c
index e0b3b09..4caace0 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkFont.c,v 1.46 2008/10/05 21:23:25 dkf Exp $
+ * RCS: @(#) $Id: tkFont.c,v 1.47 2008/10/15 06:41:06 nijtmans Exp $
*/
#include "tkInt.h"
@@ -165,7 +165,7 @@ static const TkStateMap xlfdSetwidthMap[] = {
* configuring a set of font attributes.
*/
-static const char *fontOpt[] = {
+static const char *const fontOpt[] = {
"-family",
"-size",
"-weight",
@@ -347,7 +347,7 @@ static void UpdateDependentFonts(TkFontInfo *fiPtr,
* font object points to the TkFont structure for the font, or NULL.
*/
-Tcl_ObjType tkFontObjType = {
+const Tcl_ObjType tkFontObjType = {
"font", /* name */
FreeFontObjProc, /* freeIntRepProc */
DupFontObjProc, /* dupIntRepProc */
@@ -474,7 +474,7 @@ Tk_FontObjCmd(
int index;
Tk_Window tkwin;
TkFontInfo *fiPtr;
- static const char *optionStrings[] = {
+ static const char *const optionStrings[] = {
"actual", "configure", "create", "delete",
"families", "measure", "metrics", "names",
NULL
@@ -741,7 +741,7 @@ Tk_FontObjCmd(
Tk_Font tkfont;
int skip, index, i;
const TkFontMetrics *fmPtr;
- static const char *switches[] = {
+ static const char *const switches[] = {
"-ascent", "-descent", "-linespace", "-fixed", NULL
};