summaryrefslogtreecommitdiff
path: root/gdk/gdkvisual.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdk/gdkvisual.c')
-rw-r--r--gdk/gdkvisual.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdk/gdkvisual.c b/gdk/gdkvisual.c
index 693020ef61..ebdcccb127 100644
--- a/gdk/gdkvisual.c
+++ b/gdk/gdkvisual.c
@@ -44,7 +44,7 @@ static gint navailable_types;
#ifdef G_ENABLE_DEBUG
-static gchar* visual_names[] =
+static const gchar* visual_names[] =
{
"static gray",
"grayscale",
@@ -61,8 +61,8 @@ static GHashTable *visual_hash = NULL;
void
gdk_visual_init (void)
{
- static gint possible_depths[7] = { 32, 24, 16, 15, 8, 4, 1 };
- static GdkVisualType possible_types[6] =
+ static const gint possible_depths[7] = { 32, 24, 16, 15, 8, 4, 1 };
+ static const GdkVisualType possible_types[6] =
{
GDK_VISUAL_DIRECT_COLOR,
GDK_VISUAL_TRUE_COLOR,
@@ -72,8 +72,8 @@ gdk_visual_init (void)
GDK_VISUAL_STATIC_GRAY
};
- static gint npossible_depths = 7;
- static gint npossible_types = 6;
+ static const gint npossible_depths = sizeof(possible_depths)/sizeof(gint);
+ static const gint npossible_types = sizeof(possible_types)/sizeof(GdkVisualType);
XVisualInfo *visual_list;
XVisualInfo visual_template;