[libgda] GValue to string now use GdaNumeric API
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] GValue to string now use GdaNumeric API
- Date: Sun, 22 Jan 2012 16:00:04 +0000 (UTC)
commit 5dd485e5e17b83214091ded9d9a262c8f1468c69
Author: Daniel Espinosa <despinosa src gnome org>
Date: Sun Jan 22 09:56:13 2012 -0600
GValue to string now use GdaNumeric API
libgda/gda-value.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/libgda/gda-value.c b/libgda/gda-value.c
index 32ace66..64fb814 100644
--- a/libgda/gda-value.c
+++ b/libgda/gda-value.c
@@ -201,13 +201,10 @@ set_from_string (GValue *value, const gchar *as_string)
}
}
else if (type == GDA_TYPE_NUMERIC) {
- GdaNumeric numeric;
- /* FIXME: what test whould i do for numeric? Use GMP (http://gmplib.org/) ?*/
- numeric.number = g_strdup (as_string);
- numeric.precision = 0; /* FIXME */
- numeric.width = 0; /* FIXME */
+ GdaNumeric *numeric = gda_numeric_new ();
+ gda_numeric_set_from_string (as_string);
gda_value_set_numeric (value, &numeric);
- g_free (numeric.number);
+ gda_numeric_free (numeric);
retval = TRUE;
}
else if (type == G_TYPE_DATE) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]