[libgda] GdaNumeric: Use the _ declaration technique.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] GdaNumeric: Use the _ declaration technique.
- Date: Sun, 13 Nov 2011 21:06:39 +0000 (UTC)
commit cd090c9069ace9680757930e445c821c0b86013a
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Nov 11 22:26:49 2011 +0100
GdaNumeric: Use the _ declaration technique.
This is what glib and GTK+ do. It allows the struct type to be
pre-declared elsewhere, without including the header, and without
causing a double declaration.
libgda/gda-value.h | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/libgda/gda-value.h b/libgda/gda-value.h
index 0098fdb..aeb2892 100644
--- a/libgda/gda-value.h
+++ b/libgda/gda-value.h
@@ -74,6 +74,9 @@ typedef struct {
gdouble y;
} GdaGeometricPoint;
+
+typedef struct _GdaNumeric GdaNumeric;
+
/**
* GdaNumeric:
* @number: a string representing a number
@@ -88,14 +91,14 @@ typedef struct {
* Set value func: gda_value_set_numeric
* Get value func: gda_value_get_numeric
*/
-typedef struct {
+struct _GdaNumeric {
gchar* GSEAL(number);
glong GSEAL(precision);
glong GSEAL(width);
/*< private >*/
gpointer reserved; /* reserved for future usage with GMP (http://gmplib.org/) */
-} GdaNumeric;
+};
/**
* GdaTime:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]