Commit 2cabeeb1 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Removed g_object_pointer_hash, which was just g_direct_hash.

Tue Jun  9 18:44:57 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkobject.c: Removed g_object_pointer_hash, which
	was just g_direct_hash.

Mon May 25 19:54:20 1998  Owen Taylor  <otaylor@gtk.org>

	* configure.in: x_libs=, not $x_libs=. Enough said.
          (Case only hit for --disable-xshm)

Mon May 25 12:08:14 1998  Owen Taylor  <otaylor@gtk.org>

	* configure.in (LDFLAGS): Add to $CFLAGS and $LDFLAGS
	  when testing for X libraries, don't replace them. Because
	  the user might have specified the path to the X libraries
	  themself before running configure.

	* examples/**.c: Changed all gpointer * to gpointer

Sat May 23 21:54:05 1998  Owen Taylor  <otaylor@gtk.org>

	* configure.in (LDFLAGS): Bomb out with a moderately
	  helpful message if detection of X libraries fails.

Sat May 23 18:57:06 1998  Owen Taylor  <otaylor@gtk.org>

  [ Combination of:
     gtk-rrh-980412-0.patch (Raja R Harinath <harinath@cs.umn.edu>)
     gtk-jbuhler-980516-0 (Jeremy Buhler <jbuhler@cs.washington.edu>) ]

	* gdk/gdk.h gdk/gdkcc.c gdk/gdkfont.c gtk/gtkmain.c
	  gtk/gtksignal.c gtk/gtktext.c:

	  Fixups for warnings from adding const to type of GHashFunc,
	  GCompareFunc

	* gtk/gtkcombo.c (gtk_combo_entry_key_press): Minor style/
	  ansi-warnings fixups.

Tue Jun  9 17:47:33 1998  Owen Taylor  <otaylor@gtk.org>

	* glib.h: Remove #error - HP/UX.

Sat May 23 19:00:01 1998  Owen Taylor  <otaylor@gtk.org>
  [ Combination of:
     gtk-rrh-980412-0.patch (Raja R Harinath <harinath@cs.umn.edu>)
     gtk-jbuhler-980516-0 (Jeremy Buhler <jbuhler@cs.washington.edu>) ]

	* glib.h ghash.c gstring.c gdataset.c gutils.c:
	- Added new typedef g_const_pointer; expunged all incorrect
	  uses of 'const gpointer'.
	- Fixed up warnings that that created,
	- Changed GHashFunc and GCompareFunc to take g_const_pointer
	  arguments. (Necessary, but will cause warnings in existing
	  code until fixed)
	- Added other new const in harmless positions.
parent a1fe6d03
Tue Jun 9 18:44:57 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkobject.c: Removed g_object_pointer_hash, which
was just g_direct_hash.
Mon May 25 19:54:20 1998 Owen Taylor <otaylor@gtk.org>
* configure.in: x_libs=, not $x_libs=. Enough said.
(Case only hit for --disable-xshm)
Mon May 25 12:08:14 1998 Owen Taylor <otaylor@gtk.org>
* configure.in (LDFLAGS): Add to $CFLAGS and $LDFLAGS
when testing for X libraries, don't replace them. Because
the user might have specified the path to the X libraries
themself before running configure.
* examples/**.c: Changed all gpointer * to gpointer
1998-06-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
......@@ -265,7 +284,7 @@ Sun May 24 12:11:38 BST 1998 Tony Gale <gale@gtk.org>
Sat May 23 21:54:05 1998 Owen Taylor <otaylor@gtk.org>
* configure.in (LDFLAGS): Bombo out with a moderately
* configure.in (LDFLAGS): Bomb out with a moderately
helpful message if detection of X libraries fails.
Sat May 23 18:57:06 1998 Owen Taylor <otaylor@gtk.org>
......
Tue Jun 9 18:44:57 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkobject.c: Removed g_object_pointer_hash, which
was just g_direct_hash.
Mon May 25 19:54:20 1998 Owen Taylor <otaylor@gtk.org>
* configure.in: x_libs=, not $x_libs=. Enough said.
(Case only hit for --disable-xshm)
Mon May 25 12:08:14 1998 Owen Taylor <otaylor@gtk.org>
* configure.in (LDFLAGS): Add to $CFLAGS and $LDFLAGS
when testing for X libraries, don't replace them. Because
the user might have specified the path to the X libraries
themself before running configure.
* examples/**.c: Changed all gpointer * to gpointer
1998-06-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
......@@ -265,7 +284,7 @@ Sun May 24 12:11:38 BST 1998 Tony Gale <gale@gtk.org>
Sat May 23 21:54:05 1998 Owen Taylor <otaylor@gtk.org>
* configure.in (LDFLAGS): Bombo out with a moderately
* configure.in (LDFLAGS): Bomb out with a moderately
helpful message if detection of X libraries fails.
Sat May 23 18:57:06 1998 Owen Taylor <otaylor@gtk.org>
......
Tue Jun 9 18:44:57 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkobject.c: Removed g_object_pointer_hash, which
was just g_direct_hash.
Mon May 25 19:54:20 1998 Owen Taylor <otaylor@gtk.org>
* configure.in: x_libs=, not $x_libs=. Enough said.
(Case only hit for --disable-xshm)
Mon May 25 12:08:14 1998 Owen Taylor <otaylor@gtk.org>
* configure.in (LDFLAGS): Add to $CFLAGS and $LDFLAGS
when testing for X libraries, don't replace them. Because
the user might have specified the path to the X libraries
themself before running configure.
* examples/**.c: Changed all gpointer * to gpointer
1998-06-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
......@@ -265,7 +284,7 @@ Sun May 24 12:11:38 BST 1998 Tony Gale <gale@gtk.org>
Sat May 23 21:54:05 1998 Owen Taylor <otaylor@gtk.org>
* configure.in (LDFLAGS): Bombo out with a moderately
* configure.in (LDFLAGS): Bomb out with a moderately
helpful message if detection of X libraries fails.
Sat May 23 18:57:06 1998 Owen Taylor <otaylor@gtk.org>
......
Tue Jun 9 18:44:57 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkobject.c: Removed g_object_pointer_hash, which
was just g_direct_hash.
Mon May 25 19:54:20 1998 Owen Taylor <otaylor@gtk.org>
* configure.in: x_libs=, not $x_libs=. Enough said.
(Case only hit for --disable-xshm)
Mon May 25 12:08:14 1998 Owen Taylor <otaylor@gtk.org>
* configure.in (LDFLAGS): Add to $CFLAGS and $LDFLAGS
when testing for X libraries, don't replace them. Because
the user might have specified the path to the X libraries
themself before running configure.
* examples/**.c: Changed all gpointer * to gpointer
1998-06-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
......@@ -265,7 +284,7 @@ Sun May 24 12:11:38 BST 1998 Tony Gale <gale@gtk.org>
Sat May 23 21:54:05 1998 Owen Taylor <otaylor@gtk.org>
* configure.in (LDFLAGS): Bombo out with a moderately
* configure.in (LDFLAGS): Bomb out with a moderately
helpful message if detection of X libraries fails.
Sat May 23 18:57:06 1998 Owen Taylor <otaylor@gtk.org>
......
Tue Jun 9 18:44:57 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkobject.c: Removed g_object_pointer_hash, which
was just g_direct_hash.
Mon May 25 19:54:20 1998 Owen Taylor <otaylor@gtk.org>
* configure.in: x_libs=, not $x_libs=. Enough said.
(Case only hit for --disable-xshm)
Mon May 25 12:08:14 1998 Owen Taylor <otaylor@gtk.org>
* configure.in (LDFLAGS): Add to $CFLAGS and $LDFLAGS
when testing for X libraries, don't replace them. Because
the user might have specified the path to the X libraries
themself before running configure.
* examples/**.c: Changed all gpointer * to gpointer
1998-06-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
......@@ -265,7 +284,7 @@ Sun May 24 12:11:38 BST 1998 Tony Gale <gale@gtk.org>
Sat May 23 21:54:05 1998 Owen Taylor <otaylor@gtk.org>
* configure.in (LDFLAGS): Bombo out with a moderately
* configure.in (LDFLAGS): Bomb out with a moderately
helpful message if detection of X libraries fails.
Sat May 23 18:57:06 1998 Owen Taylor <otaylor@gtk.org>
......
Tue Jun 9 18:44:57 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkobject.c: Removed g_object_pointer_hash, which
was just g_direct_hash.
Mon May 25 19:54:20 1998 Owen Taylor <otaylor@gtk.org>
* configure.in: x_libs=, not $x_libs=. Enough said.
(Case only hit for --disable-xshm)
Mon May 25 12:08:14 1998 Owen Taylor <otaylor@gtk.org>
* configure.in (LDFLAGS): Add to $CFLAGS and $LDFLAGS
when testing for X libraries, don't replace them. Because
the user might have specified the path to the X libraries
themself before running configure.
* examples/**.c: Changed all gpointer * to gpointer
1998-06-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
......@@ -265,7 +284,7 @@ Sun May 24 12:11:38 BST 1998 Tony Gale <gale@gtk.org>
Sat May 23 21:54:05 1998 Owen Taylor <otaylor@gtk.org>
* configure.in (LDFLAGS): Bombo out with a moderately
* configure.in (LDFLAGS): Bomb out with a moderately
helpful message if detection of X libraries fails.
Sat May 23 18:57:06 1998 Owen Taylor <otaylor@gtk.org>
......
Tue Jun 9 18:44:57 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkobject.c: Removed g_object_pointer_hash, which
was just g_direct_hash.
Mon May 25 19:54:20 1998 Owen Taylor <otaylor@gtk.org>
* configure.in: x_libs=, not $x_libs=. Enough said.
(Case only hit for --disable-xshm)
Mon May 25 12:08:14 1998 Owen Taylor <otaylor@gtk.org>
* configure.in (LDFLAGS): Add to $CFLAGS and $LDFLAGS
when testing for X libraries, don't replace them. Because
the user might have specified the path to the X libraries
themself before running configure.
* examples/**.c: Changed all gpointer * to gpointer
1998-06-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkhandlebox.h (struct _GtkHandleBox): Removed the
......@@ -265,7 +284,7 @@ Sun May 24 12:11:38 BST 1998 Tony Gale <gale@gtk.org>
Sat May 23 21:54:05 1998 Owen Taylor <otaylor@gtk.org>
* configure.in (LDFLAGS): Bombo out with a moderately
* configure.in (LDFLAGS): Bomb out with a moderately
helpful message if detection of X libraries fails.
Sat May 23 18:57:06 1998 Owen Taylor <otaylor@gtk.org>
......
......@@ -140,8 +140,8 @@ fi
saved_cflags="$CFLAGS"
saved_ldflags="$LDFLAGS"
CFLAGS="$X_CFLAGS"
LDFLAGS="$X_LDFLAGS $X_LIBS"
CFLAGS="$CFLAGS $X_CFLAGS"
LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
if test "x$no_x" = "xyes"; then
AC_MSG_ERROR([
......@@ -170,7 +170,7 @@ fi
AC_CHECK_LIB(Xext, XShapeCombineMask,
if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then
$x_libs="-lXext $x_libs"
x_libs="-lXext $x_libs"
fi
AC_DEFINE(HAVE_SHAPE_EXT),
,
......
......@@ -46,7 +46,7 @@ GtkWidget *xpm_label_box (GtkWidget *parent, gchar *xpm_filename, gchar *label_t
}
/* our usual callback function */
void callback (GtkWidget *widget, gpointer *data)
void callback (GtkWidget *widget, gpointer data)
{
g_print ("Hello again - %s was pressed\n", (char *) data);
}
......
......@@ -10,7 +10,7 @@ void file_ok_sel (GtkWidget *w, GtkFileSelection *fs)
g_print ("%s\n", gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)));
}
void destroy (GtkWidget *widget, gpointer *data)
void destroy (GtkWidget *widget, gpointer data)
{
gtk_main_quit ();
}
......
......@@ -6,13 +6,13 @@
/* Our new improved callback. The data passed to this function is printed
* to stdout. */
void callback (GtkWidget *widget, gpointer *data)
void callback (GtkWidget *widget, gpointer data)
{
g_print ("Hello again - %s was pressed\n", (char *) data);
}
/* another callback */
void delete_event (GtkWidget *widget, GdkEvent *event, gpointer *data)
void delete_event (GtkWidget *widget, GdkEvent *event, gpointer data)
{
gtk_main_quit ();
}
......
......@@ -36,7 +36,7 @@ void remove_book (GtkButton *button, GtkNotebook *notebook)
gtk_widget_draw(GTK_WIDGET(notebook), NULL);
}
void delete (GtkWidget *widget, GdkEvent *event, gpointer *data)
void delete (GtkWidget *widget, GdkEvent *event, gpointer data)
{
gtk_main_quit ();
}
......
......@@ -5,7 +5,7 @@
#include "gtk/gtk.h"
void
delete_event (GtkWidget *widget, GdkEvent *event, gpointer *data)
delete_event (GtkWidget *widget, GdkEvent *event, gpointer data)
{
gtk_main_quit ();
}
......
......@@ -31,14 +31,15 @@ static const char * xpm_data[] = {
/* when invoked (via signal delete_event), terminates the application.
*/
void close_application( GtkWidget *widget, GdkEvent *event, gpointer *data ) {
void close_application( GtkWidget *widget, GdkEvent *event, gpointer data )
{
gtk_main_quit();
}
/* is invoked when the button is clicked. It just prints a message.
*/
void button_clicked( GtkWidget *widget, gpointer *data ) {
void button_clicked( GtkWidget *widget, gpointer data ) {
printf( "button clicked\n" );
}
......
......@@ -33,7 +33,7 @@ void progress_r (void)
pstat = FALSE;
}
void destroy (GtkWidget *widget, GdkEvent *event, gpointer *data)
void destroy (GtkWidget *widget, GdkEvent *event, gpointer data)
{
gtk_main_quit ();
}
......
......@@ -5,7 +5,8 @@
#include <gtk/gtk.h>
#include <glib.h>
void close_application( GtkWidget *widget, GdkEvent *event, gpointer *data ) {
void close_application( GtkWidget *widget, GdkEvent *event, gpointer data )
{
gtk_main_quit();
}
......
......@@ -11,7 +11,8 @@
/* this routine gets control when the close button is clicked
*/
void close_application( GtkWidget *widget, GdkEvent *event, gpointer *data ) {
void close_application( GtkWidget *widget, GdkEvent *event, gpointer data )
{
gtk_main_quit();
}
......
......@@ -4,7 +4,7 @@
#include <gtk/gtk.h>
void destroy(GtkWidget *widget, gpointer *data)
void destroy(GtkWidget *widget, gpointer data)
{
gtk_main_quit();
}
......
......@@ -7,7 +7,7 @@
GtkWidget *status_bar;
void push_item (GtkWidget *widget, gpointer *data)
void push_item (GtkWidget *widget, gpointer data)
{
static int count = 1;
char buff[20];
......@@ -18,7 +18,7 @@ void push_item (GtkWidget *widget, gpointer *data)
return;
}
void pop_item (GtkWidget *widget, gpointer *data)
void pop_item (GtkWidget *widget, gpointer data)
{
gtk_statusbar_pop( GTK_STATUSBAR(status_bar), (guint) &data );
return;
......
......@@ -5,13 +5,13 @@
/* our callback.
* the data passed to this function is printed to stdout */
void callback (GtkWidget *widget, gpointer *data)
void callback (GtkWidget *widget, gpointer data)
{
g_print ("Hello again - %s was pressed\n", (char *) data);
}
/* this callback quits the program */
void delete_event (GtkWidget *widget, GdkEvent *event, gpointer *data)
void delete_event (GtkWidget *widget, GdkEvent *event, gpointer data)
{
gtk_main_quit ();
}
......
......@@ -123,7 +123,7 @@ static char * WheelbarrowFull_xpm[] = {
/* when invoked (via signal delete_event), terminates the application.
*/
void close_application( GtkWidget *widget, GdkEvent *event, gpointer *data ) {
void close_application( GtkWidget *widget, GdkEvent *event, gpointer data ) {
gtk_main_quit();
}
......
......@@ -490,9 +490,9 @@ GdkFont* gdk_font_load (const gchar *font_name);
GdkFont* gdk_fontset_load (gchar *fontset_name);
GdkFont* gdk_font_ref (GdkFont *font);
void gdk_font_unref (GdkFont *font);
gint gdk_font_id (GdkFont *font);
gint gdk_font_equal (GdkFont *fonta,
GdkFont *fontb);
gint gdk_font_id (const GdkFont *font);
gint gdk_font_equal (const GdkFont *fonta,
const GdkFont *fontb);
gint gdk_string_width (GdkFont *font,
const gchar *string);
gint gdk_text_width (GdkFont *font,
......
......@@ -66,19 +66,19 @@
static guint
hash_color (gpointer key)
hash_color (g_const_pointer key)
{
GdkColor *color = key;
const GdkColor *color = key;
return (color->red * 33023 + color->green * 30013 + color->blue * 27011);
}
static gint
compare_colors (gpointer a,
gpointer b)
compare_colors (g_const_pointer a,
g_const_pointer b)
{
GdkColor *aa = a;
GdkColor *bb = b;
const GdkColor *aa = a;
const GdkColor *bb = b;
return ((aa->red == bb->red) && (aa->green == bb->green) && (aa->blue == bb->blue));
}
......
......@@ -149,13 +149,13 @@ gdk_font_unref (GdkFont *font)
}
gint
gdk_font_id (GdkFont *font)
gdk_font_id (const GdkFont *font)
{
GdkFontPrivate *font_private;
const GdkFontPrivate *font_private;
g_return_val_if_fail (font != NULL, 0);
font_private = (GdkFontPrivate*) font;
font_private = (const GdkFontPrivate*) font;
if (font->type == GDK_FONT_FONT)
{
......@@ -168,17 +168,17 @@ gdk_font_id (GdkFont *font)
}
gint
gdk_font_equal (GdkFont *fonta,
GdkFont *fontb)
gdk_font_equal (const GdkFont *fonta,
const GdkFont *fontb)
{
GdkFontPrivate *privatea;
GdkFontPrivate *privateb;
const GdkFontPrivate *privatea;
const GdkFontPrivate *privateb;
g_return_val_if_fail (fonta != NULL, FALSE);
g_return_val_if_fail (fontb != NULL, FALSE);
privatea = (GdkFontPrivate*) fonta;
privateb = (GdkFontPrivate*) fontb;
privatea = (const GdkFontPrivate*) fonta;
privateb = (const GdkFontPrivate*) fontb;
if (fonta->type == GDK_FONT_FONT && fontb->type == GDK_FONT_FONT)
{
......
......@@ -66,19 +66,19 @@
static guint
hash_color (gpointer key)
hash_color (g_const_pointer key)
{
GdkColor *color = key;
const GdkColor *color = key;
return (color->red * 33023 + color->green * 30013 + color->blue * 27011);
}
static gint
compare_colors (gpointer a,
gpointer b)
compare_colors (g_const_pointer a,
g_const_pointer b)
{
GdkColor *aa = a;
GdkColor *bb = b;
const GdkColor *aa = a;
const GdkColor *bb = b;
return ((aa->red == bb->red) && (aa->green == bb->green) && (aa->blue == bb->blue));
}
......
......@@ -149,13 +149,13 @@ gdk_font_unref (GdkFont *font)
}
gint
gdk_font_id (GdkFont *font)
gdk_font_id (const GdkFont *font)
{
GdkFontPrivate *font_private;
const GdkFontPrivate *font_private;
g_return_val_if_fail (font != NULL, 0);
font_private = (GdkFontPrivate*) font;
font_private = (const GdkFontPrivate*) font;
if (font->type == GDK_FONT_FONT)
{
......@@ -168,17 +168,17 @@ gdk_font_id (GdkFont *font)
}
gint
gdk_font_equal (GdkFont *fonta,
GdkFont *fontb)
gdk_font_equal (const GdkFont *fonta,
const GdkFont *fontb)
{
GdkFontPrivate *privatea;
GdkFontPrivate *privateb;
const GdkFontPrivate *privatea;
const GdkFontPrivate *privateb;
g_return_val_if_fail (fonta != NULL, FALSE);
g_return_val_if_fail (fontb != NULL, FALSE);
privatea = (GdkFontPrivate*) fonta;
privateb = (GdkFontPrivate*) fontb;
privatea = (const GdkFontPrivate*) fonta;
privateb = (const GdkFontPrivate*) fontb;
if (fonta->type == GDK_FONT_FONT && fontb->type == GDK_FONT_FONT)
{
......
Tue Jun 9 17:47:33 1998 Owen Taylor <otaylor@gtk.org>
* glib.h: Remove #error - HP/UX.
Sat May 23 19:00:01 1998 Owen Taylor <otaylor@gtk.org>
[ Combination of:
gtk-rrh-980412-0.patch (Raja R Harinath <harinath@cs.umn.edu>)
gtk-jbuhler-980516-0 (Jeremy Buhler <jbuhler@cs.washington.edu>) ]
* glib.h ghash.c gstring.c gdataset.c gutils.c:
- Added new typedef g_const_pointer; expunged all incorrect
uses of 'const gpointer'.
- Fixed up warnings that that created,
- Changed GHashFunc and GCompareFunc to take g_const_pointer
arguments. (Necessary, but will cause warnings in existing
code until fixed)
- Added other new const in harmless positions.
Mon Jun 8 01:06:47 1998 Tim Janik <timj@gtk.org>
* glib.h: added enum-helper macros for code generation.
......
......@@ -38,16 +38,17 @@ struct _GDatasetData
gpointer data;
GDestroyNotify destroy_func;
};
struct _GDataset
{
gpointer location;
g_const_pointer location;
GDatasetData *data_list;
};
/* --- prototypes --- */
static inline GDataset* g_dataset_lookup (const gpointer dataset_location);
static inline void g_dataset_destroy_i (GDataset *dataset);
static inline GDataset* g_dataset_lookup (g_const_pointer dataset_location);
static inline void g_dataset_destroy_i (GDataset *dataset);
static void g_dataset_initialize (void);
static guint* g_dataset_id_new (void);
......@@ -64,7 +65,7 @@ static guint g_dataset_id_index = G_DATASET_ID_BLOCK_SIZE + 1;
/* --- functions --- */
static inline GDataset*
g_dataset_lookup (const gpointer dataset_location)
g_dataset_lookup (g_const_pointer dataset_location)
{
register GDataset *dataset;
......@@ -108,7 +109,7 @@ g_dataset_destroy_i (GDataset *dataset)
}
void
g_dataset_destroy (const gpointer dataset_location)
g_dataset_destroy (g_const_pointer dataset_location)
{
register GDataset *dataset;
......@@ -120,9 +121,9 @@ g_dataset_destroy (const gpointer dataset_location)
}
void
g_dataset_id_set_destroy (const gpointer dataset_location,
guint key_id,
GDestroyNotify destroy_func)
g_dataset_id_set_destroy (g_const_pointer dataset_location,
guint key_id,
GDestroyNotify destroy_func)
{
g_return_if_fail (dataset_location != NULL);
......@@ -149,8 +150,8 @@ g_dataset_id_set_destroy (const gpointer dataset_location,
}
gpointer
g_dataset_id_get_data (const gpointer dataset_location,
guint key_id)
g_dataset_id_get_data (g_const_pointer dataset_location,
guint key_id)
{
g_return_val_if_fail (dataset_location != NULL, NULL);
......@@ -173,10 +174,10 @@ g_dataset_id_get_data (const gpointer dataset_location,
}
void
g_dataset_id_set_data_full (const gpointer dataset_location,
guint key_id,
gpointer data,
GDestroyNotify destroy_func)
g_dataset_id_set_data_full (g_const_pointer dataset_location,
guint key_id,
gpointer data,
GDestroyNotify destroy_func)
{
register GDataset *dataset;
register GDatasetData *list;
......@@ -190,7 +191,9 @@ g_dataset_id_set_data_full (const gpointer dataset_location,
dataset = g_chunk_new (GDataset, g_dataset_mem_chunk);
dataset->location = dataset_location;
dataset->data_list = NULL;
g_hash_table_insert (g_dataset_location_ht, dataset->location, dataset);
g_hash_table_insert (g_dataset_location_ht,
(gpointer) dataset->location, /* Yuck */
dataset);
}
list = dataset->data_list;
......
......@@ -145,8 +145,8 @@ g_hash_table_insert (GHashTable *hash_table,
}
void
g_hash_table_remove (GHashTable *hash_table,
gpointer key)
g_hash_table_remove (GHashTable *hash_table,
g_const_pointer key)
{
GRealHashTable *rhash_table;
GHashNode *node;
......@@ -187,7 +187,7 @@ g_hash_table_remove (GHashTable *hash_table,
gpointer
g_hash_table_lookup (GHashTable *hash_table,
const gpointer key)
g_const_pointer key)
{
GRealHashTable *rhash_table;
GHashNode *node;
......
......@@ -389,6 +389,7 @@ typedef double gldouble;
#endif /* 0 */
typedef void* gpointer;
typedef const void *g_const_pointer;
#if (SIZEOF_CHAR == 1)
typedef signed char gint8;
......@@ -429,7 +430,7 @@ typedef unsigned long guint32;
#define GUINT_TO_POINTER(u) ((gpointer)(gulong)(u))
#else
#error "No integer type of the same size as a pointer"
/* This should never happen */
#endif
......@@ -455,9 +456,6 @@ typedef void (*GFunc) (gpointer data,
typedef void (*GHFunc) (gpointer key,
gpointer value,
gpointer user_data);
typedef guint (*GHashFunc) (gpointer key);
typedef gint (*GCompareFunc) (gpointer a,
gpointer b);
typedef gpointer (*GCacheNewFunc) (gpointer key);
typedef gpointer (*GCacheDupFunc) (gpointer value);
typedef void (*GCacheDestroyFunc) (gpointer value);
......@@ -474,6 +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);
struct _GList
{
......@@ -623,12 +624,12 @@ GHashTable* g_hash_table_new (GHashFunc hash_func,
GCompareFunc key_compare_func);
void g_hash_table_destroy (GHashTable *hash_table);
void g_hash_table_insert (GHashTable *hash_table,
gpointer key,
gpointer value);
gpointer key,
gpointer value);
void g_hash_table_remove (GHashTable *hash_table,
gpointer key);
g_const_pointer key);
gpointer g_hash_table_lookup (GHashTable *hash_table,
const gpointer key);
g_const_pointer 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,
......@@ -892,29 +893,29 @@ GArray* g_rarray_truncate (GArray *array,
/* Hash Functions
*/
gint g_str_equal (const gpointer v,
const gpointer v2);
guint g_str_hash (const gpointer v);
gint g_str_equal (g_const_pointer v,
g_const_pointer v2);
guint g_str_hash (g_const_pointer 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 (gpointer key);
guint g_direct_hash (g_const_pointer key);
/* Location Associated Data