diff pidgin/gtkimhtml.c @ 21015:787b3897ba9f

Patch from Andrew Gaul to constify a bunch of static variables to reduce the amount of writable memory +08108000 12K rwx-- /local/local/bin/pidgin -08107000 16K rwx-- /local/local/bin/pidgin +005bf000 20K rwx-- /local/local/lib/libpurple.so.0.2.1 -005be000 24K rwx-- /local/local/lib/libpurple.so.0.2.1
author Ka-Hing Cheung <khc@hxbc.us>
date Fri, 26 Oct 2007 04:59:23 +0000
parents 77e0fa7c5bdd
children 44a6eeaabd80
line wrap: on
line diff
--- a/pidgin/gtkimhtml.c	Fri Oct 26 00:13:18 2007 +0000
+++ b/pidgin/gtkimhtml.c	Fri Oct 26 04:59:23 2007 +0000
@@ -113,7 +113,7 @@
 /* POINT_SIZE converts from AIM font sizes to a point size scale factor. */
 #define MAX_FONT_SIZE 7
 #define POINT_SIZE(x) (_point_sizes [MIN ((x > 0 ? x : 1), MAX_FONT_SIZE) - 1])
-static gdouble _point_sizes [] = { .85, .95, 1, 1.2, 1.44, 1.728, 2.0736};
+static const gdouble _point_sizes [] = { .85, .95, 1, 1.2, 1.44, 1.728, 2.0736};
 
 enum {
 	TARGET_HTML,
@@ -140,7 +140,7 @@
 static char *text_clipboard = NULL;
 static GtkClipboard *clipboard_selection = NULL;
 
-static GtkTargetEntry selection_targets[] = {
+static const GtkTargetEntry selection_targets[] = {
 #ifndef _WIN32
 	{ "text/html", 0, TARGET_HTML },
 #else
@@ -151,7 +151,7 @@
 	{ "STRING", 0, TARGET_STRING },
 	{ "TEXT", 0, TARGET_TEXT}};
 
-static GtkTargetEntry link_drag_drop_targets[] = {
+static const GtkTargetEntry link_drag_drop_targets[] = {
 	GTK_IMHTML_DND_TARGETS
 };