[gnome-db] Patch for const removal
- From: Paisa Seeluangsawat <paisa unt edu>
- To: GDA <gnome-db-list gnome org>
- Subject: [gnome-db] Patch for const removal
- Date: Sat, 15 Nov 2003 22:06:18 -0600
Thanks Rodrigo for catching my doc comment cut & paste mistake.
Below is a patch for const removal.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libgda/ChangeLog,v
retrieving revision 1.588
diff -u -r1.588 ChangeLog
--- ChangeLog 16 Nov 2003 03:27:30 -0000 1.588
+++ ChangeLog 16 Nov 2003 03:59:39 -0000
@@ -1,3 +1,11 @@
+2003-11-15 Paisa Seeluangsawat <paisa users sf net>
+
+ * libgda/*:
+ * providers/*/*:
+ - removed 'const' from GdaRow, GdaValue, and any
+ GLib/Gtk/Gnome/libgda structs in sight.
+ - trivial fixes to stop some compiler warnings (gcc 3.2.2)
+
2003-11-12 Paisa Seeluangsawat <paisa users sf net>
* libgda/gda-blob.c:
@@ -14,7 +22,6 @@
(gda_data_model_foreach): stop the loop when user function returns
FALSE (as advertised in the spec). No longer clones the GdaRows
sent to user's callback.
-
2003-11-12 Gonzalo Paniagua Javier <gonzalo gnome-db org>
Index: libgda/gda-client.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-client.c,v
retrieving revision 1.44
diff -u -r1.44 gda-client.c
--- libgda/gda-client.c 18 Oct 2003 23:03:52 -0000 1.44
+++ libgda/gda-client.c 16 Nov 2003 03:59:39 -0000
@@ -605,7 +605,7 @@
g_return_if_fail (error != NULL);
params = gda_parameter_list_new ();
- gda_parameter_list_add_parameter (params, gda_parameter_new_gobject ("error", error));
+ gda_parameter_list_add_parameter (params, gda_parameter_new_gobject ("error", (GObject*) error));
gda_client_notify_event (client, cnc, GDA_CLIENT_EVENT_ERROR, params);
gda_parameter_list_free (params);
@@ -664,7 +664,7 @@
g_return_if_fail (GDA_IS_TRANSACTION (xaction));
params = gda_parameter_list_new ();
- gda_parameter_list_add_parameter (params, gda_parameter_new_gobject ("transaction", xaction));
+ gda_parameter_list_add_parameter (params, gda_parameter_new_gobject ("transaction", (GObject*) xaction));
gda_client_notify_event (client, cnc, GDA_CLIENT_EVENT_TRANSACTION_STARTED, params);
gda_parameter_list_free (params);
@@ -689,7 +689,7 @@
g_return_if_fail (GDA_IS_TRANSACTION (xaction));
params = gda_parameter_list_new ();
- gda_parameter_list_add_parameter (params, gda_parameter_new_gobject ("transaction", xaction));
+ gda_parameter_list_add_parameter (params, gda_parameter_new_gobject ("transaction", (GObject*) xaction));
gda_client_notify_event (client, cnc, GDA_CLIENT_EVENT_TRANSACTION_COMMITTED, params);
gda_parameter_list_free (params);
@@ -714,7 +714,7 @@
g_return_if_fail (GDA_IS_TRANSACTION (xaction));
params = gda_parameter_list_new ();
- gda_parameter_list_add_parameter (params, gda_parameter_new_gobject ("transaction", xaction));
+ gda_parameter_list_add_parameter (params, gda_parameter_new_gobject ("transaction", (GObject*) xaction));
gda_client_notify_event (client, cnc, GDA_CLIENT_EVENT_TRANSACTION_CANCELLED, params);
gda_parameter_list_free (params);
Index: libgda/gda-connection.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-connection.c,v
retrieving revision 1.52
diff -u -r1.52 gda-connection.c
--- libgda/gda-connection.c 16 Nov 2003 01:28:36 -0000 1.52
+++ libgda/gda-connection.c 16 Nov 2003 03:59:39 -0000
@@ -894,7 +894,7 @@
* Returns: a GList of #GdaError.
*
*/
-const GList *
+GList *
gda_connection_get_errors (GdaConnection *cnc)
{
g_return_val_if_fail (GDA_IS_CONNECTION (cnc), NULL);
Index: libgda/gda-connection.h
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-connection.h,v
retrieving revision 1.36
diff -u -r1.36 gda-connection.h
--- libgda/gda-connection.h 16 Oct 2003 10:23:45 -0000 1.36
+++ libgda/gda-connection.h 16 Nov 2003 03:59:40 -0000
@@ -110,7 +110,7 @@
gboolean gda_connection_create_blob (GdaConnection *cnc, GdaBlob *blob);
-const GList *gda_connection_get_errors (GdaConnection *cnc);
+GList *gda_connection_get_errors (GdaConnection *cnc);
typedef enum {
GDA_CONNECTION_FEATURE_AGGREGATES,
Index: libgda/gda-data-model-array.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-data-model-array.c,v
retrieving revision 1.18
diff -u -r1.18 gda-data-model-array.c
--- libgda/gda-data-model-array.c 18 Oct 2003 23:03:52 -0000 1.18
+++ libgda/gda-data-model-array.c 16 Nov 2003 03:59:40 -0000
@@ -66,7 +66,7 @@
return NULL;
}
-static const GdaRow *
+static GdaRow *
gda_data_model_array_get_row (GdaDataModel *model, gint row)
{
g_return_val_if_fail (GDA_IS_DATA_MODEL_ARRAY (model), NULL);
@@ -74,10 +74,10 @@
if (row >= GDA_DATA_MODEL_ARRAY (model)->priv->rows->len)
return NULL;
- return (const GdaRow *) g_ptr_array_index (GDA_DATA_MODEL_ARRAY (model)->priv->rows, row);
+ return g_ptr_array_index (GDA_DATA_MODEL_ARRAY (model)->priv->rows, row);
}
-static const GdaValue *
+static GdaValue *
gda_data_model_array_get_value_at (GdaDataModel *model, gint col, gint row)
{
GdaRow *fields;
@@ -92,7 +92,7 @@
GdaValue *field;
field = gda_row_get_value (fields, col);
- return (const GdaValue *) field;
+ return field;
}
return NULL;
@@ -105,8 +105,8 @@
return TRUE;
}
-static const GdaRow *
-gda_data_model_array_append_row (GdaDataModel *model, const GList *values)
+static GdaRow *
+gda_data_model_array_append_row (GdaDataModel *model, GList *values)
{
gint len;
GdaRow *row = NULL;
@@ -125,11 +125,11 @@
gda_data_model_row_inserted (model, GDA_DATA_MODEL_ARRAY (model)->priv->rows->len - 1);
}
- return (const GdaRow *) row;
+ return row;
}
static gboolean
-gda_data_model_array_remove_row (GdaDataModel *model, const GdaRow *row)
+gda_data_model_array_remove_row (GdaDataModel *model, GdaRow *row)
{
g_return_val_if_fail (GDA_IS_DATA_MODEL_ARRAY (model), FALSE);
g_return_val_if_fail (row != NULL, FALSE);
Index: libgda/gda-data-model-hash.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-data-model-hash.c,v
retrieving revision 1.10
diff -u -r1.10 gda-data-model-hash.c
--- libgda/gda-data-model-hash.c 18 Oct 2003 23:03:52 -0000 1.10
+++ libgda/gda-data-model-hash.c 16 Nov 2003 03:59:40 -0000
@@ -67,8 +67,8 @@
return TRUE;
}
-static const GdaRow *
-gda_data_model_hash_append_row (GdaDataModel *model, const GList *values)
+static GdaRow *
+gda_data_model_hash_append_row (GdaDataModel *model, GList *values)
{
GdaRow *row;
gint cols;
@@ -95,7 +95,7 @@
}
static gboolean
-gda_data_model_hash_remove_row (GdaDataModel *model, const GdaRow *row)
+gda_data_model_hash_remove_row (GdaDataModel *model, GdaRow *row)
{
g_return_val_if_fail (GDA_IS_DATA_MODEL_HASH (model), FALSE);
return FALSE;
@@ -212,7 +212,7 @@
* Retrieves the value at a specified column and row.
* Returns: a pointer to a #GdaValue.
*/
-const GdaValue *
+GdaValue *
gda_data_model_hash_get_value_at (GdaDataModel *model, gint col, gint row)
{
const GdaRow *fields;
@@ -223,7 +223,7 @@
if (fields == NULL)
return NULL;
- return (const GdaValue *) gda_row_get_value ((GdaRow *) fields, col);
+ return gda_row_get_value ((GdaRow *) fields, col);
}
/**
@@ -268,13 +268,13 @@
*
* Returns: a #GdaRow or NULL if the requested row is not in the hash table.
*/
-const GdaRow *
+GdaRow *
gda_data_model_hash_get_row (GdaDataModel *model, gint row)
{
g_return_val_if_fail (GDA_IS_DATA_MODEL_HASH (model), NULL);
- return (const GdaRow *) g_hash_table_lookup (GDA_DATA_MODEL_HASH (model)->priv->rows,
- GINT_TO_POINTER (row));
+ return g_hash_table_lookup (GDA_DATA_MODEL_HASH (model)->priv->rows,
+ GINT_TO_POINTER (row));
}
/**
Index: libgda/gda-data-model-hash.h
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-data-model-hash.h,v
retrieving revision 1.3
diff -u -r1.3 gda-data-model-hash.h
--- libgda/gda-data-model-hash.h 2 Jul 2002 11:56:10 -0000 1.3
+++ libgda/gda-data-model-hash.h 16 Nov 2003 03:59:40 -0000
@@ -49,7 +49,7 @@
GType gda_data_model_hash_get_type (void);
GdaDataModel *gda_data_model_hash_new (gint cols);
-const GdaValue *gda_data_model_hash_get_value_at (GdaDataModel *model,
+GdaValue *gda_data_model_hash_get_value_at (GdaDataModel *model,
gint col,
gint row);
@@ -61,7 +61,7 @@
gint rownum,
GdaRow *row);
-const GdaRow *gda_data_model_hash_get_row (GdaDataModel *model, gint row);
+GdaRow *gda_data_model_hash_get_row (GdaDataModel *model, gint row);
G_END_DECLS
Index: libgda/gda-data-model-list.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-data-model-list.c,v
retrieving revision 1.13
diff -u -r1.13 gda-data-model-list.c
--- libgda/gda-data-model-list.c 18 Oct 2003 23:03:52 -0000 1.13
+++ libgda/gda-data-model-list.c 16 Nov 2003 03:59:40 -0000
@@ -54,14 +54,14 @@
return 1;
}
-static const GdaRow *
+static GdaRow *
gda_data_model_list_get_row (GdaDataModel *model, gint row)
{
g_return_val_if_fail (GDA_IS_DATA_MODEL_LIST (model), NULL);
return gda_data_model_get_row (GDA_DATA_MODEL (GDA_DATA_MODEL_LIST (model)->priv->rows), row);
}
-static const GdaValue *
+static GdaValue *
gda_data_model_list_get_value_at (GdaDataModel *model, gint col, gint row)
{
g_return_val_if_fail (GDA_IS_DATA_MODEL_LIST (model), NULL);
@@ -77,18 +77,18 @@
return TRUE;
}
-static const GdaRow *
-gda_data_model_list_append_row (GdaDataModel *model, const GList *values)
+static GdaRow *
+gda_data_model_list_append_row (GdaDataModel *model, GList *values)
{
g_return_val_if_fail (GDA_IS_DATA_MODEL_LIST (model), NULL);
g_return_val_if_fail (values != NULL, NULL);
return gda_data_model_list_append_value (GDA_DATA_MODEL_LIST (model),
- (const GdaValue *) values->data);
+ values->data);
}
static gboolean
-gda_data_model_list_remove_row (GdaDataModel *model, const GdaRow *row)
+gda_data_model_list_remove_row (GdaDataModel *model, GdaRow *row)
{
g_return_val_if_fail (GDA_IS_DATA_MODEL_LIST (model), FALSE);
g_return_val_if_fail (row != NULL, FALSE);
@@ -236,7 +236,7 @@
* #GdaValue according to the given @list.
*/
GdaDataModel *
-gda_data_model_list_new_from_string_list (const GList *list)
+gda_data_model_list_new_from_string_list (GList *list)
{
GdaDataModel *model;
GList *l;
@@ -265,11 +265,11 @@
*
* Returns: the #GdaRow which has been inserted, or %NULL on failure.
*/
-const GdaRow *
-gda_data_model_list_append_value (GdaDataModelList *model, const GdaValue *value)
+GdaRow *
+gda_data_model_list_append_value (GdaDataModelList *model, GdaValue *value)
{
GList *values;
- const GdaRow *row;
+ GdaRow *row;
g_return_val_if_fail (GDA_IS_DATA_MODEL_LIST (model), NULL);
g_return_val_if_fail (value != NULL, NULL);
Index: libgda/gda-data-model-list.h
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-data-model-list.h,v
retrieving revision 1.4
diff -u -r1.4 gda-data-model-list.h
--- libgda/gda-data-model-list.h 9 May 2002 22:52:24 -0000 1.4
+++ libgda/gda-data-model-list.h 16 Nov 2003 03:59:40 -0000
@@ -48,10 +48,10 @@
GType gda_data_model_list_get_type (void);
GdaDataModel *gda_data_model_list_new (void);
-GdaDataModel *gda_data_model_list_new_from_string_list (const GList *list);
+GdaDataModel *gda_data_model_list_new_from_string_list (GList *list);
-const GdaRow *gda_data_model_list_append_value (GdaDataModelList *model,
- const GdaValue *value);
+GdaRow *gda_data_model_list_append_value (GdaDataModelList *model,
+ GdaValue *value);
G_END_DECLS
Index: libgda/gda-data-model.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-data-model.c,v
retrieving revision 1.40
diff -u -r1.40 gda-data-model.c
--- libgda/gda-data-model.c 16 Nov 2003 01:28:36 -0000 1.40
+++ libgda/gda-data-model.c 16 Nov 2003 03:59:40 -0000
@@ -369,7 +369,7 @@
fa = CLASS (model)->describe_column (model, col);
if (!fa) {
- const GdaValue *value;
+ GdaValue *value;
/* we generate a basic FieldAttributes structure */
fa = gda_field_attributes_new ();
@@ -503,7 +503,7 @@
*
* Returns: a #GdaRow object.
*/
-const GdaRow *
+GdaRow *
gda_data_model_get_row (GdaDataModel *model, gint row)
{
g_return_val_if_fail (GDA_IS_DATA_MODEL (model), NULL);
@@ -526,7 +526,7 @@
* Returns: a #GdaValue containing the value stored in the given
* position, or %NULL on error (out-of-bound position, etc).
*/
-const GdaValue *
+GdaValue *
gda_data_model_get_value_at (GdaDataModel *model, gint col, gint row)
{
g_return_val_if_fail (GDA_IS_DATA_MODEL (model), NULL);
@@ -563,8 +563,8 @@
*
* Returns: the unique ID of the added row.
*/
-const GdaRow *
-gda_data_model_append_row (GdaDataModel *model, const GList *values)
+GdaRow *
+gda_data_model_append_row (GdaDataModel *model, GList *values)
{
g_return_val_if_fail (GDA_IS_DATA_MODEL (model), NULL);
g_return_val_if_fail (CLASS (model)->append_row != NULL, NULL);
@@ -583,7 +583,7 @@
* Returns: %TRUE if successful, %FALSE otherwise.
*/
gboolean
-gda_data_model_remove_row (GdaDataModel *model, const GdaRow *row)
+gda_data_model_remove_row (GdaDataModel *model, GdaRow *row)
{
g_return_val_if_fail (GDA_IS_DATA_MODEL (model), FALSE);
g_return_val_if_fail (row != NULL, FALSE);
@@ -603,7 +603,7 @@
* Returns: %TRUE if successful, %FALSE otherwise.
*/
gboolean
-gda_data_model_update_row (GdaDataModel *model, const GdaRow *row)
+gda_data_model_update_row (GdaDataModel *model, GdaRow *row)
{
g_return_val_if_fail (GDA_IS_DATA_MODEL (model), FALSE);
g_return_val_if_fail (row != NULL, FALSE);
@@ -758,11 +758,11 @@
str = g_string_append_c (str, '\n');
for (c = 0; c < cols; c++) {
- const GdaValue *value;
+ GdaValue *value;
gchar *txt;
value = gda_data_model_get_value_at (model, c, r);
- txt = gda_value_stringify ((GdaValue *) value);
+ txt = gda_value_stringify (value);
if (c > 0)
str = g_string_append_c (str, sep);
str = g_string_append_c (str, '"');
@@ -933,7 +933,7 @@
row = xmlNewChild (data, NULL, "row", NULL);
xml_set_int (row, "position", r);
for (c = 0; c < cols; c++) {
- const GdaValue *value;
+ GdaValue *value;
gchar *str;
value = gda_data_model_get_value_at (model, c, r);
Index: libgda/gda-data-model.h
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-data-model.h,v
retrieving revision 1.22
diff -u -r1.22 gda-data-model.h
--- libgda/gda-data-model.h 18 Oct 2003 23:03:52 -0000 1.22
+++ libgda/gda-data-model.h 16 Nov 2003 03:59:40 -0000
@@ -63,13 +63,13 @@
gint (* get_n_rows) (GdaDataModel *model);
gint (* get_n_columns) (GdaDataModel *model);
GdaFieldAttributes * (* describe_column) (GdaDataModel *model, gint col);
- const GdaRow * (* get_row) (GdaDataModel *model, gint row);
- const GdaValue * (* get_value_at) (GdaDataModel *model, gint col, gint row);
+ GdaRow * (* get_row) (GdaDataModel *model, gint row);
+ GdaValue * (* get_value_at) (GdaDataModel *model, gint col, gint row);
gboolean (* is_editable) (GdaDataModel *model);
- const GdaRow * (* append_row) (GdaDataModel *model, const GList *values);
- gboolean (* remove_row) (GdaDataModel *model, const GdaRow *row);
- gboolean (* update_row) (GdaDataModel *model, const GdaRow *row);
+ GdaRow * (* append_row) (GdaDataModel *model, GList *values);
+ gboolean (* remove_row) (GdaDataModel *model, GdaRow *row);
+ gboolean (* update_row) (GdaDataModel *model, GdaRow *row);
};
GType gda_data_model_get_type (void);
@@ -87,13 +87,13 @@
const gchar *gda_data_model_get_column_title (GdaDataModel *model, gint col);
void gda_data_model_set_column_title (GdaDataModel *model, gint col, const gchar *title);
gint gda_data_model_get_column_position (GdaDataModel *model, const gchar *title);
-const GdaRow *gda_data_model_get_row (GdaDataModel *model, gint row);
-const GdaValue *gda_data_model_get_value_at (GdaDataModel *model, gint col, gint row);
+GdaRow *gda_data_model_get_row (GdaDataModel *model, gint row);
+GdaValue *gda_data_model_get_value_at (GdaDataModel *model, gint col, gint row);
gboolean gda_data_model_is_editable (GdaDataModel *model);
-const GdaRow *gda_data_model_append_row (GdaDataModel *model, const GList *values);
-gboolean gda_data_model_remove_row (GdaDataModel *model, const GdaRow *row);
-gboolean gda_data_model_update_row (GdaDataModel *model, const GdaRow *row);
+GdaRow *gda_data_model_append_row (GdaDataModel *model, GList *values);
+gboolean gda_data_model_remove_row (GdaDataModel *model, GdaRow *row);
+gboolean gda_data_model_update_row (GdaDataModel *model, GdaRow *row);
typedef gboolean (* GdaDataModelForeachFunc) (GdaDataModel *model,
GdaRow *row,
Index: libgda/gda-error.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-error.c,v
retrieving revision 1.13
diff -u -r1.13 gda-error.c
--- libgda/gda-error.c 18 Oct 2003 23:03:52 -0000 1.13
+++ libgda/gda-error.c 16 Nov 2003 03:59:40 -0000
@@ -141,7 +141,7 @@
* Returns: a list of errors.
*/
GList *
-gda_error_list_copy (const GList * errors)
+gda_error_list_copy (GList * errors)
{
GList *l;
GList *new_list;
Index: libgda/gda-error.h
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-error.h,v
retrieving revision 1.5
diff -u -r1.5 gda-error.h
--- libgda/gda-error.h 1 Jul 2002 02:17:02 -0000 1.5
+++ libgda/gda-error.h 16 Nov 2003 03:59:40 -0000
@@ -50,7 +50,7 @@
GType gda_error_get_type (void);
GdaError *gda_error_new (void);
void gda_error_free (GdaError * error);
-GList *gda_error_list_copy (const GList * errors);
+GList *gda_error_list_copy (GList * errors);
void gda_error_list_free (GList * errors);
const gchar *gda_error_get_description (GdaError *error);
Index: libgda/gda-field.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-field.c,v
retrieving revision 1.12
diff -u -r1.12 gda-field.c
--- libgda/gda-field.c 11 Nov 2003 16:48:36 -0000 1.12
+++ libgda/gda-field.c 16 Nov 2003 03:59:40 -0000
@@ -472,11 +472,11 @@
*
* Returns: @fa's default value, as a #GdaValue object.
*/
-const GdaValue *
+GdaValue *
gda_field_attributes_get_default_value (GdaFieldAttributes *fa)
{
g_return_val_if_fail (fa != NULL, NULL);
- return (const GdaValue *) fa->default_value;
+ return fa->default_value;
}
/**
@@ -487,7 +487,7 @@
* Sets @fa's default #GdaValue.
*/
void
-gda_field_attributes_set_default_value (GdaFieldAttributes *fa, const GdaValue *default_value)
+gda_field_attributes_set_default_value (GdaFieldAttributes *fa, GdaValue *default_value)
{
g_return_if_fail (fa != NULL);
g_return_if_fail (default_value != NULL);
Index: libgda/gda-field.h
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-field.h,v
retrieving revision 1.10
diff -u -r1.10 gda-field.h
--- libgda/gda-field.h 11 Nov 2003 16:48:36 -0000 1.10
+++ libgda/gda-field.h 16 Nov 2003 03:59:40 -0000
@@ -87,8 +87,8 @@
gint gda_field_attributes_get_position (GdaFieldAttributes *fa);
void gda_field_attributes_set_position (GdaFieldAttributes *fa, gint position);
-const GdaValue *gda_field_attributes_get_default_value (GdaFieldAttributes *fa);
-void gda_field_attributes_set_default_value (GdaFieldAttributes *fa, const GdaValue *default_value);
+GdaValue *gda_field_attributes_get_default_value (GdaFieldAttributes *fa);
+void gda_field_attributes_set_default_value (GdaFieldAttributes *fa, GdaValue *default_value);
G_END_DECLS
Index: libgda/gda-parameter.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-parameter.c,v
retrieving revision 1.25
diff -u -r1.25 gda-parameter.c
--- libgda/gda-parameter.c 11 Nov 2003 16:48:36 -0000 1.25
+++ libgda/gda-parameter.c 16 Nov 2003 03:59:40 -0000
@@ -146,7 +146,7 @@
* Returns: the newly created #GdaParameter.
*/
GdaParameter *
-gda_parameter_new_gobject (const gchar *name, const GObject *value)
+gda_parameter_new_gobject (const gchar *name, GObject *value)
{
GdaParameter *param;
@@ -253,7 +253,7 @@
*
* Returns: the value stored in the given @param.
*/
-const GdaValue *
+GdaValue *
gda_parameter_get_value (GdaParameter *param)
{
g_return_val_if_fail (param != NULL, NULL);
Index: libgda/gda-parameter.h
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-parameter.h,v
retrieving revision 1.16
diff -u -r1.16 gda-parameter.h
--- libgda/gda-parameter.h 11 Nov 2003 16:48:36 -0000 1.16
+++ libgda/gda-parameter.h 16 Nov 2003 03:59:40 -0000
@@ -39,13 +39,13 @@
GdaParameter *gda_parameter_new_from_value (const gchar *name, GdaValue *value);
GdaParameter *gda_parameter_new_boolean (const gchar *name, gboolean value);
GdaParameter *gda_parameter_new_double (const gchar *name, gdouble value);
-GdaParameter *gda_parameter_new_gobject (const gchar *name, const GObject *value);
+GdaParameter *gda_parameter_new_gobject (const gchar *name, GObject *value);
GdaParameter *gda_parameter_new_string (const gchar *name, const gchar *value);
GdaParameter *gda_parameter_copy (GdaParameter *param);
void gda_parameter_free (GdaParameter *param);
const gchar *gda_parameter_get_name (GdaParameter *param);
void gda_parameter_set_name (GdaParameter *param, const gchar *name);
-const GdaValue *gda_parameter_get_value (GdaParameter *param);
+GdaValue *gda_parameter_get_value (GdaParameter *param);
void gda_parameter_set_value (GdaParameter *param, GdaValue *value);
typedef struct _GdaParameterList GdaParameterList;
Index: libgda/gda-row.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-row.c,v
retrieving revision 1.37
diff -u -r1.37 gda-row.c
--- libgda/gda-row.c 16 Nov 2003 01:28:36 -0000 1.37
+++ libgda/gda-row.c 16 Nov 2003 03:59:41 -0000
@@ -80,7 +80,7 @@
* Returns: the newly created row.
*/
GdaRow *
-gda_row_new_from_list (GdaDataModel *model, const GList *values)
+gda_row_new_from_list (GdaDataModel *model, GList *values)
{
GdaRow *row;
const GList *l;
@@ -88,7 +88,7 @@
row = gda_row_new (model, g_list_length ((GList *) values));
for (i = 0, l = values; l != NULL; l = l->next, i++) {
- const GdaValue *value = (const GdaValue *) l->data;
+ GdaValue *value = l->data;
if (value)
gda_value_set_from_value (gda_row_get_value (row, i), value);
@@ -246,7 +246,7 @@
*
* Returns: a pointer to the #GdaValue in the position @num of @row.
*/
-G_CONST_RETURN GdaValue *
+GdaValue *
gda_row_get_value (GdaRow *row, gint num)
{
g_return_val_if_fail (row != NULL, NULL);
Index: libgda/gda-row.h
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-row.h,v
retrieving revision 1.27
diff -u -r1.27 gda-row.h
--- libgda/gda-row.h 11 Nov 2003 16:48:36 -0000 1.27
+++ libgda/gda-row.h 16 Nov 2003 03:59:41 -0000
@@ -35,7 +35,7 @@
GType gda_row_get_type (void);
GdaRow *gda_row_new (GdaDataModel *model, gint count);
-GdaRow *gda_row_new_from_list (GdaDataModel *model, const GList *values);
+GdaRow *gda_row_new_from_list (GdaDataModel *model, GList *values);
GdaRow *gda_row_copy (GdaRow *row);
void gda_row_free (GdaRow *row);
GdaDataModel *gda_row_get_model (GdaRow *row);
@@ -43,7 +43,7 @@
void gda_row_set_number (GdaRow *row, gint number);
const gchar *gda_row_get_id (GdaRow *row);
void gda_row_set_id (GdaRow *row, const gchar *id);
-G_CONST_RETURN GdaValue *gda_row_get_value (GdaRow *row, gint num);
+GdaValue *gda_row_get_value (GdaRow *row, gint num);
gint gda_row_get_length (GdaRow *row);
G_END_DECLS
Index: libgda/gda-select.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-select.c,v
retrieving revision 1.13
diff -u -r1.13 gda-select.c
--- libgda/gda-select.c 16 Nov 2003 01:28:36 -0000 1.13
+++ libgda/gda-select.c 16 Nov 2003 03:59:41 -0000
@@ -77,7 +77,7 @@
return gda_field_attributes_copy ((GdaFieldAttributes *) l->data);
}
-static const GdaRow *
+static GdaRow *
gda_select_get_row (GdaDataModel *model, gint row)
{
GdaSelect *sel = (GdaSelect *) model;
@@ -100,8 +100,8 @@
return FALSE;
}
-static const GdaRow *
-gda_select_append_row (GdaDataModel *model, const GList *values)
+static GdaRow *
+gda_select_append_row (GdaDataModel *model, GList *values)
{
GdaSelect *sel = (GdaSelect *) model;
@@ -349,7 +349,7 @@
}
}
- GDA_DATA_MODEL_CLASS (parent_class)->append_row (sel, value_list);
+ GDA_DATA_MODEL_CLASS (parent_class)->append_row ( GDA_DATA_MODEL(sel), value_list);
g_list_foreach (value_list, (GFunc) gda_value_free, NULL);
g_list_free (value_list);
Index: libgda/gda-value.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-value.c,v
retrieving revision 1.60
diff -u -r1.60 gda-value.c
--- libgda/gda-value.c 12 Nov 2003 15:56:15 -0000 1.60
+++ libgda/gda-value.c 16 Nov 2003 03:59:42 -0000
@@ -403,7 +403,7 @@
* Returns: the newly created #GdaValue.
*/
GdaValue *
-gda_value_new_date (const GdaDate *val)
+gda_value_new_date (GdaDate *val)
{
GdaValue *value;
@@ -442,7 +442,7 @@
* Returns: the newly created #GdaValue.
*/
GdaValue *
-gda_value_new_geometric_point (const GdaGeometricPoint *val)
+gda_value_new_geometric_point (GdaGeometricPoint *val)
{
GdaValue *value;
@@ -461,7 +461,7 @@
* Returns: the newly created #GdaValue.
*/
GdaValue *
-gda_value_new_gobject (const GObject *val)
+gda_value_new_gobject (GObject *val)
{
GdaValue *value;
@@ -517,7 +517,7 @@
* Returns: the newly created #GdaValue.
*/
GdaValue *
-gda_value_new_list (const GdaValueList *val)
+gda_value_new_list (GdaValueList *val)
{
GdaValue *value;
@@ -536,7 +536,7 @@
* Returns: the newly created #GdaValue.
*/
GdaValue *
-gda_value_new_money (const GdaMoney *val)
+gda_value_new_money (GdaMoney *val)
{
GdaValue *value;
@@ -555,7 +555,7 @@
* Returns: the newly created #GdaValue.
*/
GdaValue *
-gda_value_new_numeric (const GdaNumeric *val)
+gda_value_new_numeric (GdaNumeric *val)
{
GdaValue *value;
@@ -650,7 +650,7 @@
* Returns: the newly created #GdaValue.
*/
GdaValue *
-gda_value_new_time (const GdaTime *val)
+gda_value_new_time (GdaTime *val)
{
GdaValue *value;
@@ -669,7 +669,7 @@
* Returns: the newly created #GdaValue.
*/
GdaValue *
-gda_value_new_timestamp (const GdaTimestamp *val)
+gda_value_new_timestamp (GdaTimestamp *val)
{
GdaValue *value;
@@ -706,7 +706,7 @@
tstamp.second = ltm->tm_sec;
tstamp.fraction = 0;
tstamp.timezone = 0; /* FIXME */
- gda_value_set_timestamp (value, (const GdaTimestamp *) &tstamp);
+ gda_value_set_timestamp (value, &tstamp);
}
return value;
@@ -851,7 +851,7 @@
* Returns: the #GdaValueType of the value.
*/
GdaValueType
-gda_value_get_type (const GdaValue *value)
+gda_value_get_type (GdaValue *value)
{
g_return_val_if_fail (value != NULL, GDA_VALUE_TYPE_UNKNOWN);
return value->type;
@@ -867,7 +867,7 @@
* #GDA_VALUE_TYPE_NULL.
*/
gboolean
-gda_value_is_null (const GdaValue *value)
+gda_value_is_null (GdaValue *value)
{
g_return_val_if_fail (value != NULL, FALSE);
return value->type == GDA_VALUE_TYPE_NULL;
@@ -883,7 +883,7 @@
* Returns: %TRUE if a number, %FALSE otherwise.
*/
gboolean
-gda_value_is_number (const GdaValue *value)
+gda_value_is_number (GdaValue *value)
{
g_return_val_if_fail (value != NULL, FALSE);
@@ -916,7 +916,7 @@
* Returns: a newly allocated #GdaValue with a copy of the data in @value.
*/
GdaValue *
-gda_value_copy (const GdaValue *value)
+gda_value_copy (GdaValue *value)
{
GdaValue *copy;
GList *l;
@@ -1025,7 +1025,7 @@
* Returns: the value contained in @value.
*/
gint64
-gda_value_get_bigint (const GdaValue *value)
+gda_value_get_bigint (GdaValue *value)
{
g_return_val_if_fail (value != NULL, -1);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_BIGINT), -1);
@@ -1056,7 +1056,7 @@
* Returns: the value stored in @value.
*/
guint64
-gda_value_get_biguint (const GdaValue *value)
+gda_value_get_biguint (GdaValue *value)
{
g_return_val_if_fail (value != NULL, -1);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_BIGUINT), -1);
@@ -1088,7 +1088,7 @@
* Returns: the value stored in @value.
*/
G_CONST_RETURN gpointer
-gda_value_get_binary (const GdaValue *value, glong *size)
+gda_value_get_binary (GdaValue *value, glong *size)
{
gpointer val;
@@ -1128,12 +1128,12 @@
*
* Returns: the value stored in @value.
*/
-const GdaBlob *
-gda_value_get_blob (const GdaValue *value)
+GdaBlob *
+gda_value_get_blob (GdaValue *value)
{
g_return_val_if_fail (value != NULL, NULL);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_BLOB), NULL);
- return (const GdaBlob *) &value->value.v_blob;
+ return &value->value.v_blob;
}
/**
@@ -1144,7 +1144,7 @@
* Stores @val into @value.
*/
void
-gda_value_set_blob (GdaValue *value, const GdaBlob *val)
+gda_value_set_blob (GdaValue *value, GdaBlob *val)
{
g_return_if_fail (value != NULL);
g_return_if_fail (val != NULL);
@@ -1166,7 +1166,7 @@
* Returns: the value stored in @value.
*/
gboolean
-gda_value_get_boolean (const GdaValue *value)
+gda_value_get_boolean (GdaValue *value)
{
g_return_val_if_fail (value != NULL, FALSE);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_BOOLEAN), FALSE);
@@ -1196,12 +1196,12 @@
*
* Returns: the value stored in @value.
*/
-G_CONST_RETURN GdaDate *
-gda_value_get_date (const GdaValue *value)
+GdaDate *
+gda_value_get_date (GdaValue *value)
{
g_return_val_if_fail (value != NULL, NULL);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_DATE), NULL);
- return (const GdaDate *) &value->value.v_date;
+ return &value->value.v_date;
}
/**
@@ -1212,7 +1212,7 @@
* Stores @val into @value.
*/
void
-gda_value_set_date (GdaValue *value, const GdaDate *val)
+gda_value_set_date (GdaValue *value, GdaDate *val)
{
g_return_if_fail (value != NULL);
g_return_if_fail (val != NULL);
@@ -1231,7 +1231,7 @@
* Returns: the value stored in @value.
*/
gdouble
-gda_value_get_double (const GdaValue *value)
+gda_value_get_double (GdaValue *value)
{
g_return_val_if_fail (value != NULL, -1);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_DOUBLE), -1);
@@ -1261,12 +1261,12 @@
*
* Returns: the value stored in @value.
*/
-G_CONST_RETURN GdaGeometricPoint *
-gda_value_get_geometric_point (const GdaValue *value)
+GdaGeometricPoint *
+gda_value_get_geometric_point (GdaValue *value)
{
g_return_val_if_fail (value != NULL, NULL);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_GEOMETRIC_POINT), NULL);
- return (const GdaGeometricPoint *) &value->value;
+ return (GdaGeometricPoint *) &value->value;
}
/**
@@ -1277,7 +1277,7 @@
* Stores @val into @value.
*/
void
-gda_value_set_geometric_point (GdaValue *value, const GdaGeometricPoint *val)
+gda_value_set_geometric_point (GdaValue *value, GdaGeometricPoint *val)
{
g_return_if_fail (value != NULL);
g_return_if_fail (val != NULL);
@@ -1294,12 +1294,12 @@
*
* Returns: the value stored in @value.
*/
-G_CONST_RETURN GObject *
-gda_value_get_gobject (const GdaValue *value)
+GObject *
+gda_value_get_gobject (GdaValue *value)
{
g_return_val_if_fail (value != NULL, NULL);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_GOBJECT), NULL);
- return (const GObject *) value->value.v_gobj;
+ return value->value.v_gobj;
}
/**
@@ -1310,7 +1310,7 @@
* Stores @val into @value.
*/
void
-gda_value_set_gobject (GdaValue *value, const GObject *val)
+gda_value_set_gobject (GdaValue *value, GObject *val)
{
g_return_if_fail (value != NULL);
@@ -1328,7 +1328,7 @@
* Returns: the value stored in @value.
*/
gint
-gda_value_get_integer (const GdaValue *value)
+gda_value_get_integer (GdaValue *value)
{
g_return_val_if_fail (value != NULL, -1);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_INTEGER), -1);
@@ -1358,12 +1358,12 @@
*
* Returns: the value stored in @value.
*/
-G_CONST_RETURN GdaValueList *
-gda_value_get_list (const GdaValue *value)
+GdaValueList *
+gda_value_get_list (GdaValue *value)
{
g_return_val_if_fail (value != NULL, NULL);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_LIST), NULL);
- return (const GdaValueList *) value->value.v_list;
+ return value->value.v_list;
}
/**
@@ -1374,7 +1374,7 @@
* Stores @val into @value.
*/
void
-gda_value_set_list (GdaValue *value, const GdaValueList *val)
+gda_value_set_list (GdaValue *value, GdaValueList *val)
{
g_return_if_fail (value != NULL);
g_return_if_fail (val != NULL);
@@ -1388,12 +1388,12 @@
*
* Returns: the value stored in @value.
*/
-G_CONST_RETURN GdaMoney *
-gda_value_get_money (const GdaValue *value)
+GdaMoney *
+gda_value_get_money (GdaValue *value)
{
g_return_val_if_fail (value != NULL, NULL);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_MONEY), NULL);
- return (const GdaMoney *) &value->value.v_money;
+ return &value->value.v_money;
}
/**
@@ -1404,7 +1404,7 @@
* Stores @val into @value.
*/
void
-gda_value_set_money (GdaValue *value, const GdaMoney *val)
+gda_value_set_money (GdaValue *value, GdaMoney *val)
{
g_return_if_fail (value != NULL);
g_return_if_fail (val != NULL);
@@ -1436,12 +1436,12 @@
*
* Returns: the value stored in @value.
*/
-G_CONST_RETURN GdaNumeric *
-gda_value_get_numeric (const GdaValue *value)
+GdaNumeric *
+gda_value_get_numeric (GdaValue *value)
{
g_return_val_if_fail (value != NULL, NULL);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_NUMERIC), NULL);
- return (const GdaNumeric *) &value->value.v_numeric;
+ return &value->value.v_numeric;
}
/**
@@ -1452,7 +1452,7 @@
* Stores @val into @value.
*/
void
-gda_value_set_numeric (GdaValue *value, const GdaNumeric *val)
+gda_value_set_numeric (GdaValue *value, GdaNumeric *val)
{
g_return_if_fail (value != NULL);
g_return_if_fail (val != NULL);
@@ -1471,7 +1471,7 @@
* Returns: the value stored in @value.
*/
gfloat
-gda_value_get_single (const GdaValue *value)
+gda_value_get_single (GdaValue *value)
{
g_return_val_if_fail (value != NULL, -1);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_SINGLE), -1);
@@ -1502,7 +1502,7 @@
* Returns: the value stored in @value.
*/
gshort
-gda_value_get_smallint (const GdaValue *value)
+gda_value_get_smallint (GdaValue *value)
{
g_return_val_if_fail (value != NULL, -1);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_SMALLINT), -1);
@@ -1533,7 +1533,7 @@
* Returns: the value stored in @value.
*/
gushort
-gda_value_get_smalluint (const GdaValue *value)
+gda_value_get_smalluint (GdaValue *value)
{
g_return_val_if_fail (value != NULL, -1);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_SMALLUINT), -1);
@@ -1564,7 +1564,7 @@
* Returns: the value stored in @value.
*/
const gchar *
-gda_value_get_string (const GdaValue *value)
+gda_value_get_string (GdaValue *value)
{
g_return_val_if_fail (value != NULL, NULL);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_STRING), NULL);
@@ -1594,12 +1594,12 @@
*
* Returns: the value stored in @value.
*/
-const GdaTime *
-gda_value_get_time (const GdaValue *value)
+GdaTime *
+gda_value_get_time (GdaValue *value)
{
g_return_val_if_fail (value != NULL, NULL);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_TIME), NULL);
- return (const GdaTime *) &value->value.v_time;
+ return &value->value.v_time;
}
/**
@@ -1610,7 +1610,7 @@
* Stores @val into @value.
*/
void
-gda_value_set_time (GdaValue *value, const GdaTime *val)
+gda_value_set_time (GdaValue *value, GdaTime *val)
{
g_return_if_fail (value != NULL);
g_return_if_fail (val != NULL);
@@ -1629,12 +1629,12 @@
*
* Returns: the value stored in @value.
*/
-const GdaTimestamp *
-gda_value_get_timestamp (const GdaValue *value)
+GdaTimestamp *
+gda_value_get_timestamp (GdaValue *value)
{
g_return_val_if_fail (value != NULL, NULL);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_TIMESTAMP), NULL);
- return (const GdaTimestamp *) &value->value.v_timestamp;
+ return &value->value.v_timestamp;
}
/**
@@ -1645,7 +1645,7 @@
* Stores @val into @value.
*/
void
-gda_value_set_timestamp (GdaValue *value, const GdaTimestamp *val)
+gda_value_set_timestamp (GdaValue *value, GdaTimestamp *val)
{
g_return_if_fail (value != NULL);
g_return_if_fail (val != NULL);
@@ -1669,7 +1669,7 @@
* Returns: the value stored in @value.
*/
gchar
-gda_value_get_tinyint (const GdaValue *value)
+gda_value_get_tinyint (GdaValue *value)
{
g_return_val_if_fail (value != NULL, -1);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_TINYINT), -1);
@@ -1700,7 +1700,7 @@
* Returns: the value stored in @value.
*/
guchar
-gda_value_get_tinyuint (const GdaValue *value)
+gda_value_get_tinyuint (GdaValue *value)
{
g_return_val_if_fail (value != NULL, -1);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_TINYUINT), -1);
@@ -1731,7 +1731,7 @@
* Returns: the value stored in @value.
*/
guint
-gda_value_get_uinteger (const GdaValue *value)
+gda_value_get_uinteger (GdaValue *value)
{
g_return_val_if_fail (value != NULL, -1);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_UINTEGER), -1);
@@ -1762,7 +1762,7 @@
* Returns: the value stored in @value.
*/
GdaValueType
-gda_value_get_vtype (const GdaValue *value)
+gda_value_get_vtype (GdaValue *value)
{
g_return_val_if_fail (value != NULL, GDA_VALUE_TYPE_UNKNOWN);
g_return_val_if_fail (gda_value_isa (value, GDA_VALUE_TYPE_TYPE), GDA_VALUE_TYPE_UNKNOWN);
@@ -1824,7 +1824,7 @@
* Returns: %TRUE if successful, %FALSE otherwise.
*/
gboolean
-gda_value_set_from_value (GdaValue *value, const GdaValue *from)
+gda_value_set_from_value (GdaValue *value, GdaValue *from)
{
g_return_val_if_fail (value != NULL, FALSE);
g_return_val_if_fail (from != NULL, FALSE);
@@ -1922,15 +1922,15 @@
* the preceding table.
*/
gchar *
-gda_value_stringify (const GdaValue *value)
+gda_value_stringify (GdaValue *value)
{
- const GdaTime *gdatime;
- const GdaDate *gdadate;
- const GdaTimestamp *timestamp;
- const GdaGeometricPoint *point;
- const GdaValueList *list;
- const GdaNumeric *numeric;
- const GdaBlob *gdablob;
+ GdaTime *gdatime;
+ GdaDate *gdadate;
+ GdaTimestamp *timestamp;
+ GdaGeometricPoint *point;
+ GdaValueList *list;
+ GdaNumeric *numeric;
+ GdaBlob *gdablob;
GList *l;
GString *str = NULL;
gchar *retval = NULL;
@@ -2091,7 +2091,7 @@
* an integer greater than 0 if @value1 is greater than @value2.
*/
gint
-gda_value_compare (const GdaValue *value1, const GdaValue *value2)
+gda_value_compare (GdaValue *value1, GdaValue *value2)
{
GList *l1, *l2;
gint retval;
@@ -2211,7 +2211,7 @@
* because of some localization with gda_value_stingify ().
*/
static gchar *
-to_string (const GdaValue *value)
+to_string (GdaValue *value)
{
gchar *retval = NULL;
@@ -2241,7 +2241,7 @@
* Returns: the XML node. Once not needed anymore, you should free it.
*/
xmlNodePtr
-gda_value_to_xml (const GdaValue *value)
+gda_value_to_xml (GdaValue *value)
{
gchar *valstr;
xmlNodePtr retval;
Index: libgda/gda-value.h
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-value.h,v
retrieving revision 1.34
diff -u -r1.34 gda-value.h
--- libgda/gda-value.h 11 Nov 2003 16:48:36 -0000 1.34
+++ libgda/gda-value.h 16 Nov 2003 03:59:42 -0000
@@ -143,22 +143,22 @@
GdaValue *gda_value_new_bigint (gint64 val);
GdaValue *gda_value_new_biguint(guint64 val);
GdaValue *gda_value_new_binary (gconstpointer val, glong size);
-GdaValue *gda_value_new_blob (const GdaBlob *val);
+GdaValue *gda_value_new_blob (GdaBlob *val);
GdaValue *gda_value_new_boolean (gboolean val);
-GdaValue *gda_value_new_date (const GdaDate *val);
+GdaValue *gda_value_new_date (GdaDate *val);
GdaValue *gda_value_new_double (gdouble val);
-GdaValue *gda_value_new_geometric_point (const GdaGeometricPoint *val);
-GdaValue *gda_value_new_gobject (const GObject *val);
+GdaValue *gda_value_new_geometric_point (GdaGeometricPoint *val);
+GdaValue *gda_value_new_gobject (GObject *val);
GdaValue *gda_value_new_integer (gint val);
-GdaValue *gda_value_new_list (const GdaValueList *val);
-GdaValue *gda_value_new_money (const GdaMoney *val);
-GdaValue *gda_value_new_numeric (const GdaNumeric *val);
+GdaValue *gda_value_new_list (GdaValueList *val);
+GdaValue *gda_value_new_money (GdaMoney *val);
+GdaValue *gda_value_new_numeric (GdaNumeric *val);
GdaValue *gda_value_new_single (gfloat val);
GdaValue *gda_value_new_smallint (gshort val);
GdaValue *gda_value_new_smalluint (gushort val);
GdaValue *gda_value_new_string (const gchar *val);
-GdaValue *gda_value_new_time (const GdaTime *val);
-GdaValue *gda_value_new_timestamp (const GdaTimestamp *val);
+GdaValue *gda_value_new_time (GdaTime *val);
+GdaValue *gda_value_new_timestamp (GdaTimestamp *val);
GdaValue *gda_value_new_timestamp_from_timet (time_t val);
GdaValue *gda_value_new_tinyint (gchar val);
GdaValue *gda_value_new_tinyuint (guchar val);
@@ -170,69 +170,69 @@
void gda_value_free (GdaValue *value);
-GdaValueType gda_value_get_type (const GdaValue *value);
+GdaValueType gda_value_get_type (GdaValue *value);
#define gda_value_isa(value,type) (gda_value_get_type (value) == type)
-gboolean gda_value_is_null (const GdaValue *value);
-gboolean gda_value_is_number (const GdaValue *value);
-GdaValue *gda_value_copy (const GdaValue *value);
+gboolean gda_value_is_null (GdaValue *value);
+gboolean gda_value_is_number (GdaValue *value);
+GdaValue *gda_value_copy (GdaValue *value);
-gint64 gda_value_get_bigint (const GdaValue *value);
+gint64 gda_value_get_bigint (GdaValue *value);
void gda_value_set_bigint (GdaValue *value, gint64 val);
-guint64 gda_value_get_biguint (const GdaValue *value);
+guint64 gda_value_get_biguint (GdaValue *value);
void gda_value_set_biguint (GdaValue *value, guint64 val);
-G_CONST_RETURN gpointer gda_value_get_binary (const GdaValue *value, glong *size);
+G_CONST_RETURN gpointer gda_value_get_binary (GdaValue *value, glong *size);
void gda_value_set_binary (GdaValue *value, gconstpointer val, glong size);
-G_CONST_RETURN GdaBlob *gda_value_get_blob (const GdaValue *value);
-void gda_value_set_blob (GdaValue *value, const GdaBlob *val);
-gboolean gda_value_get_boolean (const GdaValue *value);
+GdaBlob *gda_value_get_blob (GdaValue *value);
+void gda_value_set_blob (GdaValue *value, GdaBlob *val);
+gboolean gda_value_get_boolean (GdaValue *value);
void gda_value_set_boolean (GdaValue *value, gboolean val);
-G_CONST_RETURN GdaDate *gda_value_get_date (const GdaValue *value);
-void gda_value_set_date (GdaValue *value, const GdaDate *val);
-gdouble gda_value_get_double (const GdaValue *value);
+GdaDate *gda_value_get_date (GdaValue *value);
+void gda_value_set_date (GdaValue *value, GdaDate *val);
+gdouble gda_value_get_double (GdaValue *value);
void gda_value_set_double (GdaValue *value, gdouble val);
-G_CONST_RETURN GdaGeometricPoint *gda_value_get_geometric_point (const GdaValue *value);
-void gda_value_set_geometric_point (GdaValue *value, const GdaGeometricPoint *val);
-G_CONST_RETURN GObject *gda_value_get_gobject (const GdaValue *value);
-void gda_value_set_gobject (GdaValue *value, const GObject *val);
-gint gda_value_get_integer (const GdaValue *value);
+GdaGeometricPoint *gda_value_get_geometric_point (GdaValue *value);
+void gda_value_set_geometric_point (GdaValue *value, GdaGeometricPoint *val);
+GObject *gda_value_get_gobject (GdaValue *value);
+void gda_value_set_gobject (GdaValue *value, GObject *val);
+gint gda_value_get_integer (GdaValue *value);
void gda_value_set_integer (GdaValue *value, gint val);
-G_CONST_RETURN GdaValueList *gda_value_get_list (const GdaValue *value);
-void gda_value_set_list (GdaValue *value, const GdaValueList *val);
+GdaValueList *gda_value_get_list (GdaValue *value);
+void gda_value_set_list (GdaValue *value, GdaValueList *val);
void gda_value_set_null (GdaValue *value);
-G_CONST_RETURN GdaMoney *gda_value_get_money (const GdaValue *value);
-void gda_value_set_money (GdaValue *value, const GdaMoney *val);
-G_CONST_RETURN GdaNumeric *gda_value_get_numeric (const GdaValue *value);
-void gda_value_set_numeric (GdaValue *value, const GdaNumeric *val);
-gfloat gda_value_get_single (const GdaValue *value);
+GdaMoney *gda_value_get_money (GdaValue *value);
+void gda_value_set_money (GdaValue *value, GdaMoney *val);
+GdaNumeric *gda_value_get_numeric (GdaValue *value);
+void gda_value_set_numeric (GdaValue *value, GdaNumeric *val);
+gfloat gda_value_get_single (GdaValue *value);
void gda_value_set_single (GdaValue *value, gfloat val);
-gshort gda_value_get_smallint (const GdaValue *value);
+gshort gda_value_get_smallint (GdaValue *value);
void gda_value_set_smallint (GdaValue *value, gshort val);
-gushort gda_value_get_smalluint (const GdaValue *value);
+gushort gda_value_get_smalluint (GdaValue *value);
void gda_value_set_smalluint (GdaValue *value, gushort val);
-G_CONST_RETURN gchar *gda_value_get_string (const GdaValue *value);
+G_CONST_RETURN gchar *gda_value_get_string (GdaValue *value);
void gda_value_set_string (GdaValue *value, const gchar *val);
-G_CONST_RETURN GdaTime *gda_value_get_time (const GdaValue *value);
-void gda_value_set_time (GdaValue *value, const GdaTime *val);
-G_CONST_RETURN GdaTimestamp *gda_value_get_timestamp (const GdaValue *value);
-void gda_value_set_timestamp (GdaValue *value, const GdaTimestamp *val);
-gchar gda_value_get_tinyint (const GdaValue *value);
+GdaTime *gda_value_get_time (GdaValue *value);
+void gda_value_set_time (GdaValue *value, GdaTime *val);
+GdaTimestamp *gda_value_get_timestamp (GdaValue *value);
+void gda_value_set_timestamp (GdaValue *value, GdaTimestamp *val);
+gchar gda_value_get_tinyint (GdaValue *value);
void gda_value_set_tinyint (GdaValue *value, gchar val);
-guchar gda_value_get_tinyuint (const GdaValue *value);
+guchar gda_value_get_tinyuint (GdaValue *value);
void gda_value_set_tinyuint (GdaValue *value, guchar val);
-guint gda_value_get_uinteger (const GdaValue *value);
+guint gda_value_get_uinteger (GdaValue *value);
void gda_value_set_uinteger (GdaValue *value, guint val);
-GdaValueType gda_value_get_vtype (const GdaValue *value);
+GdaValueType gda_value_get_vtype (GdaValue *value);
void gda_value_set_vtype (GdaValue *value, GdaValueType type);
gboolean gda_value_set_from_string (GdaValue *value,
const gchar *as_string,
GdaValueType type);
-gboolean gda_value_set_from_value (GdaValue *value, const GdaValue *from);
+gboolean gda_value_set_from_value (GdaValue *value, GdaValue *from);
-gint gda_value_compare (const GdaValue *value1,
- const GdaValue *value2);
-gchar *gda_value_stringify (const GdaValue *value);
-xmlNodePtr gda_value_to_xml (const GdaValue *value);
+gint gda_value_compare (GdaValue *value1,
+ GdaValue *value2);
+gchar *gda_value_stringify (GdaValue *value);
+xmlNodePtr gda_value_to_xml (GdaValue *value);
G_END_DECLS
Index: libgda/gda-xml-database.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-xml-database.c,v
retrieving revision 1.28
diff -u -r1.28 gda-xml-database.c
--- libgda/gda-xml-database.c 18 Oct 2003 23:03:52 -0000 1.28
+++ libgda/gda-xml-database.c 16 Nov 2003 03:59:42 -0000
@@ -755,7 +755,7 @@
gda_field_attributes_set_references (
fa, xmlGetProp (children, PROPERTY_REFERENCES));
gda_field_attributes_set_caption (
- fa, atoi (xmlGetProp (children, PROPERTY_CAPTION)));
+ fa, xmlGetProp (children, PROPERTY_CAPTION));
gda_field_attributes_set_auto_increment (
fa, atoi (xmlGetProp (children, PROPERTY_AUTO)));
Index: libsql/sql_parse_test.c
===================================================================
RCS file: /cvs/gnome/libgda/libsql/sql_parse_test.c,v
retrieving revision 1.1
diff -u -r1.1 sql_parse_test.c
--- libsql/sql_parse_test.c 17 Jun 2002 20:57:46 -0000 1.1
+++ libsql/sql_parse_test.c 16 Nov 2003 03:59:42 -0000
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "sql_parser.h"
#include "mem.h"
Index: libsql/sql_parser.c
===================================================================
RCS file: /cvs/gnome/libgda/libsql/sql_parser.c,v
retrieving revision 1.2
diff -u -r1.2 sql_parser.c
--- libsql/sql_parser.c 24 Jul 2003 01:00:02 -0000 1.2
+++ libsql/sql_parser.c 16 Nov 2003 03:59:43 -0000
@@ -296,7 +296,7 @@
* Returns: A generated sql_statement or %NULL on error.
*/
sql_statement *
-sql_parse(char *sqlquery)
+sql_parse(const char *sqlquery)
{
if (sqlquery == NULL)
{
Index: libsql/sql_parser.h
===================================================================
RCS file: /cvs/gnome/libgda/libsql/sql_parser.h,v
retrieving revision 1.3
diff -u -r1.3 sql_parser.h
--- libsql/sql_parser.h 1 Aug 2003 09:37:32 -0000 1.3
+++ libsql/sql_parser.h 16 Nov 2003 03:59:43 -0000
@@ -207,7 +207,7 @@
int sql_display(sql_statement * statement);
int sql_destroy(sql_statement * statement);
-sql_statement *sql_parse(char *sql_statement);
+sql_statement *sql_parse(const char *sql_statement);
char *sql_stringify(sql_statement * statement);
int sql_statement_append_field(sql_statement * statement, char *tablename, char *fieldname);
Index: providers/ldap/gda-ldap-provider.c
===================================================================
RCS file: /cvs/gnome/libgda/providers/ldap/gda-ldap-provider.c,v
retrieving revision 1.4
diff -u -r1.4 gda-ldap-provider.c
--- providers/ldap/gda-ldap-provider.c 3 Feb 2003 17:12:13 -0000 1.4
+++ providers/ldap/gda-ldap-provider.c 16 Nov 2003 03:59:43 -0000
@@ -398,7 +398,7 @@
gda_data_model_append_row (GDA_DATA_MODEL (recset), value_list);
/*printf ("%s\n", oc->oc_names[j]);*/
- g_list_foreach (value_list, gda_value_free, NULL);
+ g_list_foreach (value_list, (GFunc) gda_value_free, NULL);
g_list_free (value_list);
}
}
Index: providers/ldap/gda-ldap-recordset.c
===================================================================
RCS file: /cvs/gnome/libgda/providers/ldap/gda-ldap-recordset.c,v
retrieving revision 1.2
diff -u -r1.2 gda-ldap-recordset.c
--- providers/ldap/gda-ldap-recordset.c 16 Jan 2003 00:10:33 -0000 1.2
+++ providers/ldap/gda-ldap-recordset.c 16 Nov 2003 03:59:43 -0000
@@ -197,7 +197,7 @@
return attrs;
}
-static const GdaRow *
+static GdaRow *
gda_ldap_recordset_get_row (GdaDataModel *model, gint row)
{
gint rows = 0;
@@ -214,7 +214,7 @@
if (row >= rows)
return NULL;
if (row < fetched_rows)
- return (const GdaRow *) g_ptr_array_index (recset->rows, row);
+ return (GdaRow *) g_ptr_array_index (recset->rows, row);
gda_data_model_freeze (GDA_DATA_MODEL (recset));
@@ -228,10 +228,10 @@
gda_data_model_thaw (GDA_DATA_MODEL (recset));
- return (const GdaRow *) fields;
+ return fields;
}
-static const GdaValue *
+static GdaValue *
gda_ldap_recordset_get_value_at (GdaDataModel *model, gint col, gint row)
{
gint cols = 0;
@@ -260,8 +260,8 @@
return cmd_type == GDA_COMMAND_TYPE_TABLE ? TRUE : FALSE;
}
-static const GdaRow *
-gda_ldap_recordset_append_row (GdaDataModel *model, const GList *values)
+static GdaRow *
+gda_ldap_recordset_append_row (GdaDataModel *model, GList *values)
{
GString *sql;
GdaRow *row;
@@ -340,17 +340,17 @@
row = gda_row_new_from_list (model, values);
g_ptr_array_add (recset->rows, row);
- return (const GdaRow *) row;
+ return row;
}
static gboolean
-gda_ldap_recordset_remove_row (GdaDataModel *model, const GdaRow *row)
+gda_ldap_recordset_remove_row (GdaDataModel *model, GdaRow *row)
{
return FALSE;
}
static gboolean
-gda_ldap_recordset_update_row (GdaDataModel *model, const GdaRow *row)
+gda_ldap_recordset_update_row (GdaDataModel *model, GdaRow *row)
{
return FALSE;
}
Index: providers/mysql/gda-mysql-provider.c
===================================================================
RCS file: /cvs/gnome/libgda/providers/mysql/gda-mysql-provider.c,v
retrieving revision 1.46
diff -u -r1.46 gda-mysql-provider.c
--- providers/mysql/gda-mysql-provider.c 16 Oct 2003 22:58:06 -0000 1.46
+++ providers/mysql/gda-mysql-provider.c 16 Nov 2003 03:59:44 -0000
@@ -685,7 +685,7 @@
gda_data_model_append_row (GDA_DATA_MODEL (recset), list);
- g_list_foreach (list, gda_value_free, NULL);
+ g_list_foreach (list, (GFunc) gda_value_free, NULL);
g_list_free (list);
}
@@ -1153,8 +1153,7 @@
return NULL;
}
- gda_data_model_append_row (GDA_DATA_MODEL (recset),
- (const GList *) value_list);
+ gda_data_model_append_row (GDA_DATA_MODEL (recset), value_list);
g_list_foreach (value_list, (GFunc) gda_value_free, NULL);
g_list_free (value_list);
Index: providers/mysql/gda-mysql-recordset.c
===================================================================
RCS file: /cvs/gnome/libgda/providers/mysql/gda-mysql-recordset.c,v
retrieving revision 1.27
diff -u -r1.27 gda-mysql-recordset.c
--- providers/mysql/gda-mysql-recordset.c 16 Oct 2003 22:58:06 -0000 1.27
+++ providers/mysql/gda-mysql-recordset.c 16 Nov 2003 03:59:44 -0000
@@ -30,6 +30,7 @@
#define PARENT_TYPE GDA_TYPE_DATA_MODEL
+void fill_gda_value (GdaValue *gda_value, enum enum_field_types type, gchar *value, unsigned long length);
static void gda_mysql_recordset_class_init (GdaMysqlRecordsetClass *klass);
static void gda_mysql_recordset_init (GdaMysqlRecordset *recset,
GdaMysqlRecordsetClass *klass);
@@ -223,7 +224,7 @@
return attrs;
}
-static const GdaRow *
+static GdaRow *
gda_mysql_recordset_get_row (GdaDataModel *model, gint row)
{
gint rows;
@@ -240,7 +241,7 @@
if (row >= rows)
return NULL;
if (row < fetched_rows)
- return (const GdaRow *) g_ptr_array_index (recset->rows, row);
+ return (GdaRow *) g_ptr_array_index (recset->rows, row);
gda_data_model_freeze (GDA_DATA_MODEL (recset));
@@ -254,10 +255,10 @@
gda_data_model_thaw (GDA_DATA_MODEL (recset));
- return (const GdaRow *) fields;
+ return fields;
}
-static const GdaValue *
+static GdaValue *
gda_mysql_recordset_get_value_at (GdaDataModel *model, gint col, gint row)
{
gint cols;
@@ -286,8 +287,8 @@
return cmd_type == GDA_COMMAND_TYPE_TABLE ? TRUE : FALSE;
}
-static const GdaRow *
-gda_mysql_recordset_append_row (GdaDataModel *model, const GList *values)
+static GdaRow *
+gda_mysql_recordset_append_row (GdaDataModel *model, GList *values)
{
GString *sql;
GdaRow *row;
@@ -366,17 +367,17 @@
row = gda_row_new_from_list (model, values);
g_ptr_array_add (recset->rows, row);
- return (const GdaRow *) row;
+ return row;
}
static gboolean
-gda_mysql_recordset_remove_row (GdaDataModel *model, const GdaRow *row)
+gda_mysql_recordset_remove_row (GdaDataModel *model, GdaRow *row)
{
return FALSE;
}
static gboolean
-gda_mysql_recordset_update_row (GdaDataModel *model, const GdaRow *row)
+gda_mysql_recordset_update_row (GdaDataModel *model, GdaRow *row)
{
return FALSE;
}
Index: providers/mysql/utils.c
===================================================================
RCS file: /cvs/gnome/libgda/providers/mysql/utils.c,v
retrieving revision 1.7
diff -u -r1.7 utils.c
--- providers/mysql/utils.c 16 Oct 2003 22:58:06 -0000 1.7
+++ providers/mysql/utils.c 16 Nov 2003 03:59:44 -0000
@@ -84,6 +84,8 @@
case FIELD_TYPE_NEWDATE :
case FIELD_TYPE_ENUM :
case FIELD_TYPE_SET :
+ case FIELD_TYPE_GEOMETRY : /* no longer find this in mysql manual, but
+ include it here to stop compiler warning */
return GDA_VALUE_TYPE_STRING;
}
Index: providers/odbc/gda-odbc-recordset.c
===================================================================
RCS file: /cvs/gnome/libgda/providers/odbc/gda-odbc-recordset.c,v
retrieving revision 1.2
diff -u -r1.2 gda-odbc-recordset.c
--- providers/odbc/gda-odbc-recordset.c 27 Jan 2003 23:26:18 -0000 1.2
+++ providers/odbc/gda-odbc-recordset.c 16 Nov 2003 03:59:44 -0000
@@ -45,10 +45,10 @@
GdaOdbcRecordsetClass *klass);
static void gda_odbc_recordset_finalize (GObject *object);
-static const GdaValue *gda_odbc_recordset_get_value_at (GdaDataModel *model, gint col, gint row);
+static GdaValue *gda_odbc_recordset_get_value_at (GdaDataModel *model, gint col, gint row);
static GdaFieldAttributes *gda_odbc_recordset_describe (GdaDataModel *model, gint col);
static gint gda_odbc_recordset_get_n_rows (GdaDataModel *model);
-static const GdaRow *gda_odbc_recordset_get_row (GdaDataModel *model, gint rownum);
+static GdaRow *gda_odbc_recordset_get_row (GdaDataModel *model, gint rownum);
static GObjectClass *parent_class = NULL;
@@ -115,7 +115,7 @@
* Overrides
*/
-static const GdaRow *
+static GdaRow *
gda_odbc_recordset_get_row (GdaDataModel *model, gint row)
{
/* FIXME: Write this */
@@ -123,7 +123,7 @@
return NULL;
}
-static const GdaValue *
+static GdaValue *
gda_odbc_recordset_get_value_at (GdaDataModel *model, gint col, gint row)
{
/* FIXME: Write this */
Index: providers/xml/gda-xml-provider.c
===================================================================
RCS file: /cvs/gnome/libgda/providers/xml/gda-xml-provider.c,v
retrieving revision 1.4
diff -u -r1.4 gda-xml-provider.c
--- providers/xml/gda-xml-provider.c 3 Sep 2003 10:17:32 -0000 1.4
+++ providers/xml/gda-xml-provider.c 16 Nov 2003 03:59:45 -0000
@@ -300,7 +300,7 @@
if (table) {
gda_select_add_source (select,
l->data,
- (const GdaDataModel *) table);
+ (GdaDataModel *) table);
}
}
@@ -612,8 +612,7 @@
value = gda_value_new_string ((const gchar *) l->data);
value_list = g_list_append (NULL, value);
- gda_data_model_append_row (GDA_DATA_MODEL (recset),
- (const GList *) value_list);
+ gda_data_model_append_row (GDA_DATA_MODEL (recset), value_list);
gda_value_free (value);
g_list_free (value_list);
Index: report/libgda-report/gda-report-document.c
===================================================================
RCS file: /cvs/gnome/libgda/report/libgda-report/gda-report-document.c,v
retrieving revision 1.14
diff -u -r1.14 gda-report-document.c
--- report/libgda-report/gda-report-document.c 23 Feb 2003 21:50:52 -0000 1.14
+++ report/libgda-report/gda-report-document.c 16 Nov 2003 03:59:45 -0000
@@ -21,6 +21,7 @@
* Boston, MA 02111-1307, USA.
*/
+#include <string.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libgda/gda-intl.h>
Index: testing/ibmdb2-test.c
===================================================================
RCS file: /cvs/gnome/libgda/testing/ibmdb2-test.c,v
retrieving revision 1.1
diff -u -r1.1 ibmdb2-test.c
--- testing/ibmdb2-test.c 11 Feb 2003 14:47:16 -0000 1.1
+++ testing/ibmdb2-test.c 16 Nov 2003 03:59:45 -0000
@@ -31,7 +31,6 @@
GdaCommand *command;
gboolean retval;
GList *list;
- const GList *error_list;
command = gda_command_new (query,
GDA_COMMAND_TYPE_SQL,
Index: testing/models.c
===================================================================
RCS file: /cvs/gnome/libgda/testing/models.c,v
retrieving revision 1.10
diff -u -r1.10 models.c
--- testing/models.c 13 May 2002 22:30:55 -0000 1.10
+++ testing/models.c 16 Nov 2003 03:59:45 -0000
@@ -84,7 +84,7 @@
for (r = 0; r < rows; r++) {
g_print ("\tRow %02d -------\n", r);
for (c = 0; c < cols; c++) {
- const GdaValue *value;
+ GdaValue *value;
gchar *strvalue;
const gchar *colname;
@@ -147,7 +147,7 @@
for (r = 0; r < rows; r++) {
for (c = 0; c < cols; c++) {
- const GdaValue *value;
+ GdaValue *value;
gchar *str;
value = gda_data_model_get_value_at (model, c, r);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]