From 344572dc7129d688a99bedff8ba3b8e46ffd0376 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Wed, 10 Jun 1998 16:59:28 +0000 Subject: [PATCH] Renamed g_const_pointer => gconstpointer. --- ChangeLog | 9 +++++++++ ChangeLog.pre-2-0 | 9 +++++++++ ChangeLog.pre-2-10 | 9 +++++++++ ChangeLog.pre-2-2 | 9 +++++++++ ChangeLog.pre-2-4 | 9 +++++++++ ChangeLog.pre-2-6 | 9 +++++++++ ChangeLog.pre-2-8 | 9 +++++++++ gdk/gdkcc.c | 6 +++--- gdk/x11/gdkcc-x11.c | 6 +++--- glib/ChangeLog | 4 ++++ glib/gdataset.c | 28 ++++++++++++++-------------- glib/ghash.c | 8 ++++---- glib/glib.h | 28 ++++++++++++++-------------- glib/gstring.c | 4 ++-- glib/gutils.c | 2 +- glib/testglib.c | 14 +++++++------- gtk/gtkaccelgroup.c | 6 +++--- gtk/gtkbindings.c | 10 +++++----- gtk/gtkmain.c | 12 ++++++------ gtk/gtksignal.c | 12 ++++++------ gtk/gtktext.c | 2 +- 21 files changed, 136 insertions(+), 69 deletions(-) diff --git a/ChangeLog b/ChangeLog index 140772a93d..f760a0c22e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Wed Jun 10 12:57:03 1998 Owen Taylor + + * gdk/gdkcc.c glib/ghash.c glib/glib.h glib/gstring.c + glib/gutils.c glib/testglib.c glib/gdataset.c + gtk/gtkaccelgroup.c gtk/gtkmain.c gtk/gtksignal.c + gtk/gtktext.c gtk/gtkbindings.c: + + renamed g_const_pointer => gconstpointer + Wed Jun 10 06:25:17 1998 Tim Janik * gdk/gdk.c (gdk_init): prevent gdk_init() from segfaulting when diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 140772a93d..f760a0c22e 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,12 @@ +Wed Jun 10 12:57:03 1998 Owen Taylor + + * gdk/gdkcc.c glib/ghash.c glib/glib.h glib/gstring.c + glib/gutils.c glib/testglib.c glib/gdataset.c + gtk/gtkaccelgroup.c gtk/gtkmain.c gtk/gtksignal.c + gtk/gtktext.c gtk/gtkbindings.c: + + renamed g_const_pointer => gconstpointer + Wed Jun 10 06:25:17 1998 Tim Janik * gdk/gdk.c (gdk_init): prevent gdk_init() from segfaulting when diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 140772a93d..f760a0c22e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +Wed Jun 10 12:57:03 1998 Owen Taylor + + * gdk/gdkcc.c glib/ghash.c glib/glib.h glib/gstring.c + glib/gutils.c glib/testglib.c glib/gdataset.c + gtk/gtkaccelgroup.c gtk/gtkmain.c gtk/gtksignal.c + gtk/gtktext.c gtk/gtkbindings.c: + + renamed g_const_pointer => gconstpointer + Wed Jun 10 06:25:17 1998 Tim Janik * gdk/gdk.c (gdk_init): prevent gdk_init() from segfaulting when diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 140772a93d..f760a0c22e 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,12 @@ +Wed Jun 10 12:57:03 1998 Owen Taylor + + * gdk/gdkcc.c glib/ghash.c glib/glib.h glib/gstring.c + glib/gutils.c glib/testglib.c glib/gdataset.c + gtk/gtkaccelgroup.c gtk/gtkmain.c gtk/gtksignal.c + gtk/gtktext.c gtk/gtkbindings.c: + + renamed g_const_pointer => gconstpointer + Wed Jun 10 06:25:17 1998 Tim Janik * gdk/gdk.c (gdk_init): prevent gdk_init() from segfaulting when diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 140772a93d..f760a0c22e 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,12 @@ +Wed Jun 10 12:57:03 1998 Owen Taylor + + * gdk/gdkcc.c glib/ghash.c glib/glib.h glib/gstring.c + glib/gutils.c glib/testglib.c glib/gdataset.c + gtk/gtkaccelgroup.c gtk/gtkmain.c gtk/gtksignal.c + gtk/gtktext.c gtk/gtkbindings.c: + + renamed g_const_pointer => gconstpointer + Wed Jun 10 06:25:17 1998 Tim Janik * gdk/gdk.c (gdk_init): prevent gdk_init() from segfaulting when diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 140772a93d..f760a0c22e 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +Wed Jun 10 12:57:03 1998 Owen Taylor + + * gdk/gdkcc.c glib/ghash.c glib/glib.h glib/gstring.c + glib/gutils.c glib/testglib.c glib/gdataset.c + gtk/gtkaccelgroup.c gtk/gtkmain.c gtk/gtksignal.c + gtk/gtktext.c gtk/gtkbindings.c: + + renamed g_const_pointer => gconstpointer + Wed Jun 10 06:25:17 1998 Tim Janik * gdk/gdk.c (gdk_init): prevent gdk_init() from segfaulting when diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 140772a93d..f760a0c22e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +Wed Jun 10 12:57:03 1998 Owen Taylor + + * gdk/gdkcc.c glib/ghash.c glib/glib.h glib/gstring.c + glib/gutils.c glib/testglib.c glib/gdataset.c + gtk/gtkaccelgroup.c gtk/gtkmain.c gtk/gtksignal.c + gtk/gtktext.c gtk/gtkbindings.c: + + renamed g_const_pointer => gconstpointer + Wed Jun 10 06:25:17 1998 Tim Janik * gdk/gdk.c (gdk_init): prevent gdk_init() from segfaulting when diff --git a/gdk/gdkcc.c b/gdk/gdkcc.c index 0465094972..12631a0772 100644 --- a/gdk/gdkcc.c +++ b/gdk/gdkcc.c @@ -66,7 +66,7 @@ static guint -hash_color (g_const_pointer key) +hash_color (gconstpointer key) { const GdkColor *color = key; @@ -74,8 +74,8 @@ hash_color (g_const_pointer key) } static gint -compare_colors (g_const_pointer a, - g_const_pointer b) +compare_colors (gconstpointer a, + gconstpointer b) { const GdkColor *aa = a; const GdkColor *bb = b; diff --git a/gdk/x11/gdkcc-x11.c b/gdk/x11/gdkcc-x11.c index 0465094972..12631a0772 100644 --- a/gdk/x11/gdkcc-x11.c +++ b/gdk/x11/gdkcc-x11.c @@ -66,7 +66,7 @@ static guint -hash_color (g_const_pointer key) +hash_color (gconstpointer key) { const GdkColor *color = key; @@ -74,8 +74,8 @@ hash_color (g_const_pointer key) } static gint -compare_colors (g_const_pointer a, - g_const_pointer b) +compare_colors (gconstpointer a, + gconstpointer b) { const GdkColor *aa = a; const GdkColor *bb = b; diff --git a/glib/ChangeLog b/glib/ChangeLog index e926811630..4b21235d15 100644 --- a/glib/ChangeLog +++ b/glib/ChangeLog @@ -1,3 +1,7 @@ +Wed Jun 10 12:56:07 1998 Owen Taylor + + * glib.h: renamed g_const_pointer => gconstpointer + Tue Jun 9 17:47:33 1998 Owen Taylor * glib.h: Remove #error - HP/UX. diff --git a/glib/gdataset.c b/glib/gdataset.c index 35ec007790..aef270cbf4 100644 --- a/glib/gdataset.c +++ b/glib/gdataset.c @@ -41,14 +41,14 @@ struct _GDatasetData struct _GDataset { - g_const_pointer location; + gconstpointer location; GDatasetData *data_list; }; /* --- prototypes --- */ -static inline GDataset* g_dataset_lookup (g_const_pointer dataset_location); -static inline void g_dataset_destroy_i (GDataset *dataset); +static inline GDataset* g_dataset_lookup (gconstpointer dataset_location); +static inline void g_dataset_destroy_i (GDataset *dataset); static void g_dataset_initialize (void); static guint* g_dataset_id_new (void); @@ -65,7 +65,7 @@ static guint g_dataset_id_index = G_DATASET_ID_BLOCK_SIZE + 1; /* --- functions --- */ static inline GDataset* -g_dataset_lookup (g_const_pointer dataset_location) +g_dataset_lookup (gconstpointer dataset_location) { register GDataset *dataset; @@ -109,7 +109,7 @@ g_dataset_destroy_i (GDataset *dataset) } void -g_dataset_destroy (g_const_pointer dataset_location) +g_dataset_destroy (gconstpointer dataset_location) { register GDataset *dataset; @@ -121,9 +121,9 @@ g_dataset_destroy (g_const_pointer dataset_location) } void -g_dataset_id_set_destroy (g_const_pointer dataset_location, - guint key_id, - GDestroyNotify destroy_func) +g_dataset_id_set_destroy (gconstpointer dataset_location, + guint key_id, + GDestroyNotify destroy_func) { g_return_if_fail (dataset_location != NULL); @@ -150,8 +150,8 @@ g_dataset_id_set_destroy (g_const_pointer dataset_location, } gpointer -g_dataset_id_get_data (g_const_pointer dataset_location, - guint key_id) +g_dataset_id_get_data (gconstpointer dataset_location, + guint key_id) { g_return_val_if_fail (dataset_location != NULL, NULL); @@ -174,10 +174,10 @@ g_dataset_id_get_data (g_const_pointer dataset_location, } void -g_dataset_id_set_data_full (g_const_pointer dataset_location, - guint key_id, - gpointer data, - GDestroyNotify destroy_func) +g_dataset_id_set_data_full (gconstpointer dataset_location, + guint key_id, + gpointer data, + GDestroyNotify destroy_func) { register GDataset *dataset; register GDatasetData *list; diff --git a/glib/ghash.c b/glib/ghash.c index 4891570361..ceee09843c 100644 --- a/glib/ghash.c +++ b/glib/ghash.c @@ -145,8 +145,8 @@ g_hash_table_insert (GHashTable *hash_table, } void -g_hash_table_remove (GHashTable *hash_table, - g_const_pointer key) +g_hash_table_remove (GHashTable *hash_table, + gconstpointer key) { GRealHashTable *rhash_table; GHashNode *node; @@ -186,8 +186,8 @@ g_hash_table_remove (GHashTable *hash_table, } gpointer -g_hash_table_lookup (GHashTable *hash_table, - g_const_pointer key) +g_hash_table_lookup (GHashTable *hash_table, + gconstpointer key) { GRealHashTable *rhash_table; GHashNode *node; diff --git a/glib/glib.h b/glib/glib.h index c1c3c5ee5d..75e0286236 100644 --- a/glib/glib.h +++ b/glib/glib.h @@ -389,7 +389,7 @@ typedef double gldouble; #endif /* 0 */ typedef void* gpointer; -typedef const void *g_const_pointer; +typedef const void *gconstpointer; #if (SIZEOF_CHAR == 1) typedef signed char gint8; @@ -472,9 +472,9 @@ typedef void (*GScannerMsgFunc) (GScanner *scanner, gint error); typedef void (*GDestroyNotify) (gpointer data); -typedef guint (*GHashFunc) (g_const_pointer key); -typedef gint (*GCompareFunc) (g_const_pointer a, - g_const_pointer b); +typedef guint (*GHashFunc) (gconstpointer key); +typedef gint (*GCompareFunc) (gconstpointer a, + gconstpointer b); struct _GList { @@ -627,9 +627,9 @@ void g_hash_table_insert (GHashTable *hash_table, gpointer key, gpointer value); void g_hash_table_remove (GHashTable *hash_table, - g_const_pointer key); + gconstpointer key); gpointer g_hash_table_lookup (GHashTable *hash_table, - g_const_pointer key); + gconstpointer key); void g_hash_table_freeze (GHashTable *hash_table); void g_hash_table_thaw (GHashTable *hash_table); void g_hash_table_foreach (GHashTable *hash_table, @@ -893,29 +893,29 @@ GArray* g_rarray_truncate (GArray *array, /* Hash Functions */ -gint g_str_equal (g_const_pointer v, - g_const_pointer v2); -guint g_str_hash (g_const_pointer v); +gint g_str_equal (gconstpointer v, + gconstpointer v2); +guint g_str_hash (gconstpointer v); /* This "hash" function will just return the key's adress as an * unsigned integer. Useful for hashing on plain adresses or * simple integer values. */ -guint g_direct_hash (g_const_pointer key); +guint g_direct_hash (gconstpointer key); /* Location Associated Data */ -void g_dataset_destroy (g_const_pointer dataset_location); +void g_dataset_destroy (gconstpointer dataset_location); guint g_dataset_try_key (const gchar *key); guint g_dataset_force_id (const gchar *key); -gpointer g_dataset_id_get_data (g_const_pointer dataset_location, +gpointer g_dataset_id_get_data (gconstpointer dataset_location, guint key_id); -void g_dataset_id_set_data_full (g_const_pointer dataset_location, +void g_dataset_id_set_data_full (gconstpointer dataset_location, guint key_id, gpointer data, GDestroyNotify destroy_func); -void g_dataset_id_set_destroy (g_const_pointer dataset_location, +void g_dataset_id_set_destroy (gconstpointer dataset_location, guint key_id, GDestroyNotify destroy_func); diff --git a/glib/gstring.c b/glib/gstring.c index a4c20449c9..8350552d21 100644 --- a/glib/gstring.c +++ b/glib/gstring.c @@ -50,14 +50,14 @@ static GMemChunk *string_mem_chunk = NULL; */ gint -g_str_equal (g_const_pointer v, g_const_pointer v2) +g_str_equal (gconstpointer v, gconstpointer v2) { return strcmp ((const gchar*) v, (const gchar*)v2) == 0; } /* a char* hash function from ASU */ guint -g_str_hash (g_const_pointer v) +g_str_hash (gconstpointer v) { const char *s = (char*)v; const char *p; diff --git a/glib/gutils.c b/glib/gutils.c index ef1b4090d8..d24bbdbe6e 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -847,7 +847,7 @@ g_parse_debug_string (const gchar *string, } guint -g_direct_hash(g_const_pointer key) +g_direct_hash(gconstpointer key) { return GPOINTER_TO_UINT (key); } diff --git a/glib/testglib.c b/glib/testglib.c index 8c638eefaa..e96dfb5700 100644 --- a/glib/testglib.c +++ b/glib/testglib.c @@ -33,20 +33,20 @@ my_hash_callback (gpointer key, } guint -my_hash (g_const_pointer key) +my_hash (gconstpointer key) { return (guint) *((const gint*) key); } gint -my_hash_compare (g_const_pointer a, - g_const_pointer b) +my_hash_compare (gconstpointer a, + gconstpointer b) { return *((const gint*) a) == *((const gint*) b); } gint -my_list_compare_one (g_const_pointer a, g_const_pointer b) +my_list_compare_one (gconstpointer a, gconstpointer b) { gint one = *((const gint*)a); gint two = *((const gint*)b); @@ -54,7 +54,7 @@ my_list_compare_one (g_const_pointer a, g_const_pointer b) } gint -my_list_compare_two (g_const_pointer a, g_const_pointer b) +my_list_compare_two (gconstpointer a, gconstpointer b) { gint one = *((const gint*)a); gint two = *((const gint*)b); @@ -69,8 +69,8 @@ my_list_print (gpointer a, gpointer b) }; */ gint -my_compare (g_const_pointer a, - g_const_pointer b) +my_compare (gconstpointer a, + gconstpointer b) { const char *cha = a; const char *chb = b; diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c index 36168883ea..1eb3e77628 100644 --- a/gtk/gtkaccelgroup.c +++ b/gtk/gtkaccelgroup.c @@ -57,8 +57,8 @@ static GMemChunk *accel_entries_mem_chunk = NULL; /* --- functions --- */ static gint -gtk_accel_entries_equal (g_const_pointer a, - g_const_pointer b) +gtk_accel_entries_equal (gconstpointer a, + gconstpointer b) { const GtkAccelEntry *e1; const GtkAccelEntry *e2; @@ -72,7 +72,7 @@ gtk_accel_entries_equal (g_const_pointer a, } static guint -gtk_accel_entries_hash (g_const_pointer a) +gtk_accel_entries_hash (gconstpointer a) { const GtkAccelEntry *e; guint h; diff --git a/gtk/gtkbindings.c b/gtk/gtkbindings.c index be3ddc87aa..ad75a0228b 100644 --- a/gtk/gtkbindings.c +++ b/gtk/gtkbindings.c @@ -70,7 +70,7 @@ binding_signal_free (GtkBindingSignal *sig) } static guint -binding_entry_hash (g_const_pointer key) +binding_entry_hash (gconstpointer key) { register const GtkBindingEntry *e = key; register guint h; @@ -82,8 +82,8 @@ binding_entry_hash (g_const_pointer key) } static gint -binding_entries_compare (g_const_pointer a, - g_const_pointer b) +binding_entries_compare (gconstpointer a, + gconstpointer b) { register const GtkBindingEntry *ea = a; register const GtkBindingEntry *eb = b; @@ -762,8 +762,8 @@ binding_match_activate (GSList *pspec_list, } static gint -gtk_binding_pattern_compare (g_const_pointer a, - g_const_pointer b) +gtk_binding_pattern_compare (gconstpointer a, + gconstpointer b) { register const GtkPatternSpec *pa = a; register const GtkPatternSpec *pb = b; diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 802ebce6af..732f7431e0 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -128,11 +128,11 @@ static gint gtk_timeout_remove_from_list (GList **list, guint tag, gint remove_link); -static gint gtk_idle_compare (g_const_pointer a, - g_const_pointer b); +static gint gtk_idle_compare (gconstpointer a, + gconstpointer b); -static gint gtk_timeout_compare (g_const_pointer a, - g_const_pointer b); +static gint gtk_timeout_compare (gconstpointer a, + gconstpointer b); const guint gtk_major_version = GTK_MAJOR_VERSION; const guint gtk_minor_version = GTK_MINOR_VERSION; @@ -995,7 +995,7 @@ gtk_timeout_remove (guint tag) * sure that we insert at the _end_ of the idles of this priority */ static gint -gtk_idle_compare (g_const_pointer a, g_const_pointer b) +gtk_idle_compare (gconstpointer a, gconstpointer b) { return (((const GtkIdleFunction *)a)->priority < ((const GtkIdleFunction *)b)->priority) @@ -1364,7 +1364,7 @@ gtk_exit_func (void) * sure that we insert after timeouts of equal interval */ static gint -gtk_timeout_compare (g_const_pointer a, g_const_pointer b) +gtk_timeout_compare (gconstpointer a, gconstpointer b) { return (((const GtkTimeoutFunction *)a)->interval < ((const GtkTimeoutFunction *)b)->interval) diff --git a/gtk/gtksignal.c b/gtk/gtksignal.c index 0e08565bb4..45330e84f1 100644 --- a/gtk/gtksignal.c +++ b/gtk/gtksignal.c @@ -119,9 +119,9 @@ struct _GtkDisconnectInfo }; -static guint gtk_signal_hash (g_const_pointer h); -static gint gtk_signal_compare (g_const_pointer h1, - g_const_pointer h2); +static guint gtk_signal_hash (gconstpointer h); +static gint gtk_signal_compare (gconstpointer h1, + gconstpointer h2); static GtkHandler* gtk_signal_handler_new (void); static void gtk_signal_handler_ref (GtkHandler *handler); static void gtk_signal_handler_unref (GtkHandler *handler, @@ -1186,7 +1186,7 @@ gtk_signal_set_funcs (GtkSignalMarshal marshal_func, } static guint -gtk_signal_hash (g_const_pointer h) +gtk_signal_hash (gconstpointer h) { register const GtkSignalHash *hash = h; @@ -1194,8 +1194,8 @@ gtk_signal_hash (g_const_pointer h) } static gint -gtk_signal_compare (g_const_pointer h1, - g_const_pointer h2) +gtk_signal_compare (gconstpointer h1, + gconstpointer h2) { register const GtkSignalHash *hash1 = h1; register const GtkSignalHash *hash2 = h2; diff --git a/gtk/gtktext.c b/gtk/gtktext.c index 1acca9b5bc..47d63fcc53 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -2495,7 +2495,7 @@ insert_expose (GtkText* text, guint old_pixels, gint nchars, } static guint -font_hash (g_const_pointer font) +font_hash (gconstpointer font) { return gdk_font_id ((const GdkFont*) font); }