[libgda] gda_numeric_copy(), gda_numeric_free(): Use actual types.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] gda_numeric_copy(), gda_numeric_free(): Use actual types.
- Date: Fri, 11 Nov 2011 21:44:27 +0000 (UTC)
commit b6cca7870b996b10078947b1c71bb327ae83d266
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Nov 11 22:42:57 2011 +0100
gda_numeric_copy(), gda_numeric_free(): Use actual types.
There is no need to use gpointer instead of GdaNumeric* and that
is not the convention.
libgda/gda-value.c | 8 +++-----
libgda/gda-value.h | 4 ++--
2 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/libgda/gda-value.c b/libgda/gda-value.c
index c70d0bd..bca07a5 100644
--- a/libgda/gda-value.c
+++ b/libgda/gda-value.c
@@ -830,10 +830,9 @@ gda_numeric_get_type (void)
* Free-function: gda_numeric_free
*/
-gpointer
-gda_numeric_copy (gpointer boxed)
+GdaNumeric*
+gda_numeric_copy (GdaNumeric *src)
{
- GdaNumeric *src = (GdaNumeric*) boxed;
GdaNumeric *copy;
g_return_val_if_fail (src, NULL);
@@ -852,9 +851,8 @@ gda_numeric_copy (gpointer boxed)
* Deallocates all memory associated to the given @boxed
*/
void
-gda_numeric_free (gpointer boxed)
+gda_numeric_free (GdaNumeric *numeric)
{
- GdaNumeric *numeric = (GdaNumeric*) boxed;
g_return_if_fail (numeric);
g_free (numeric->number);
diff --git a/libgda/gda-value.h b/libgda/gda-value.h
index 98fb8b9..0098fdb 100644
--- a/libgda/gda-value.h
+++ b/libgda/gda-value.h
@@ -264,7 +264,7 @@ GType gda_null_get_type (void) G_GNUC_CONST;
GType gda_default_get_type (void) G_GNUC_CONST;
GType gda_numeric_get_type (void) G_GNUC_CONST;
GdaNumeric* gda_numeric_new (void);
-gpointer gda_numeric_copy (gpointer boxed);
+GdaNumeric* gda_numeric_copy (GdaNumeric *src);
void gda_numeric_set_from_string (GdaNumeric *numeric, const gchar* str);
void gda_numeric_set_double (GdaNumeric *numeric, gdouble number);
gdouble gda_numeric_get_double (GdaNumeric *numeric);
@@ -273,7 +273,7 @@ glong gda_numeric_get_precision (GdaNumeric *numeric
void gda_numeric_set_width (GdaNumeric *numeric, glong width);
glong gda_numeric_get_width (GdaNumeric *numeric);
gchar* gda_numeric_get_string (GdaNumeric *numeric);
-void gda_numeric_free (gpointer boxed);
+void gda_numeric_free (GdaNumeric *numeric);
GType gda_time_get_type (void) G_GNUC_CONST;
gpointer gda_time_copy (gpointer boxed);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]