Commit 99a4393c authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

declared function array as const.

2005-04-29  Sven Neumann  <sven@gimp.org>

        * tools/pdbgen/enumcode.pl: declared function array as const.

        * libgimp/gimpenums.c.tail: regenerated.
parent 4ab7e091
2005-04-29 Sven Neumann <sven@gimp.org>
* tools/pdbgen/enumcode.pl: declared function array as const.
* libgimp/gimpenums.c.tail: regenerated.
2005-04-29 Sven Neumann <sven@gimp.org> 2005-04-29 Sven Neumann <sven@gimp.org>
* app/core/gimpprojection-construct.c (gimp_projection_construct): * app/core/gimpprojection-construct.c (gimp_projection_construct):
......
typedef GType (* GimpGetTypeFunc) (void); typedef GType (* GimpGetTypeFunc) (void);
static GimpGetTypeFunc get_type_funcs[] = static const GimpGetTypeFunc get_type_funcs[] =
{ {
gimp_add_mask_type_get_type, gimp_add_mask_type_get_type,
gimp_blend_mode_get_type, gimp_blend_mode_get_type,
...@@ -94,12 +94,10 @@ static const gchar *type_names[] = ...@@ -94,12 +94,10 @@ static const gchar *type_names[] =
void void
_gimp_enums_init (void) _gimp_enums_init (void)
{ {
GimpGetTypeFunc *funcs; const GimpGetTypeFunc *funcs = get_type_funcs;
gint i; gint i;
for (i = 0, funcs = get_type_funcs; for (i = 0; i < G_N_ELEMENTS (get_type_funcs); i++, funcs++)
i < G_N_ELEMENTS (get_type_funcs);
i++, funcs++)
{ {
GType type = (*funcs) (); GType type = (*funcs) ();
......
...@@ -117,7 +117,7 @@ print ENUMFILE <<CODE; ...@@ -117,7 +117,7 @@ print ENUMFILE <<CODE;
typedef GType (* GimpGetTypeFunc) (void); typedef GType (* GimpGetTypeFunc) (void);
static GimpGetTypeFunc get_type_funcs[] = static const GimpGetTypeFunc get_type_funcs[] =
{ {
CODE CODE
...@@ -164,12 +164,10 @@ print ENUMFILE <<CODE; ...@@ -164,12 +164,10 @@ print ENUMFILE <<CODE;
void void
_gimp_enums_init (void) _gimp_enums_init (void)
{ {
GimpGetTypeFunc *funcs; const GimpGetTypeFunc *funcs = get_type_funcs;
gint i; gint i;
for (i = 0, funcs = get_type_funcs; for (i = 0; i < G_N_ELEMENTS (get_type_funcs); i++, funcs++)
i < G_N_ELEMENTS (get_type_funcs);
i++, funcs++)
{ {
GType type = (*funcs) (); GType type = (*funcs) ();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment