gpointer data;
GDestroyNotify destroy_func;
};
+
struct _GDataset
{
- gpointer location;
+ gconstpointer 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 (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);
/* --- functions --- */
static inline GDataset*
-g_dataset_lookup (const gpointer dataset_location)
+g_dataset_lookup (gconstpointer dataset_location)
{
register GDataset *dataset;
}
void
-g_dataset_destroy (const gpointer dataset_location)
+g_dataset_destroy (gconstpointer dataset_location)
{
register GDataset *dataset;
}
void
-g_dataset_id_set_destroy (const gpointer 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);
}
gpointer
-g_dataset_id_get_data (const gpointer 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);
}
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 (gconstpointer dataset_location,
+ guint key_id,
+ gpointer data,
+ GDestroyNotify destroy_func)
{
register GDataset *dataset;
register GDatasetData *list;
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;