[libgda/LIBGDA_4.0] sql-parser: Enum Macros and get_type() functions: Fix the prefix.
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda/LIBGDA_4.0] sql-parser: Enum Macros and get_type() functions: Fix the prefix.
- Date: Tue, 11 May 2010 19:04:58 +0000 (UTC)
commit e19a810bab991a9dc829aea4f42433aaa8963ad0
Author: Vivien Malerba <malerba gnome-db org>
Date: Tue May 11 20:42:09 2010 +0200
sql-parser: Enum Macros and get_type() functions: Fix the prefix.
libgda/sql-parser/Makefile.am: glib-mkenums was called with a
GDA_SQL_PARSER_TYPE prefix instead of a GDA_TYPE prefix, though
the enum types themselves have regular Gda prefixes, even if they
happen to be in a sub-directory. This made it hard for
language-bindings (including libgdamm and pygda) to guess the
function and macro names.
For bug #617429
libgda/Makefile.am | 2 --
libgda/sql-parser/Makefile.am | 6 +++---
.../sql-parser/gda-sql-parser-enum-types.h.KEEPAPI | 12 +++++++++++-
3 files changed, 14 insertions(+), 6 deletions(-)
---
diff --git a/libgda/Makefile.am b/libgda/Makefile.am
index d5a816c..2bce28c 100644
--- a/libgda/Makefile.am
+++ b/libgda/Makefile.am
@@ -136,7 +136,6 @@ libgda_sources = \
dir-blob-op.c \
gda-attributes-manager.c \
$(gda_headers) \
- gda-connection-internal.h \
gda-connection-sqlite.h \
gda-custom-marshal.c \
gda-custom-marshal.h \
@@ -321,7 +320,6 @@ Gda- GDA_ABI_VERSION@.gir: $(INTROSPECTION_SCANNER) libgda- GDA_ABI_VERSION@.la
--c-include=$(top_srcdir)/libgda/csv.h \
--c-include=$(top_srcdir)/libgda/libcsv.c \
--c-include=$(srcdir)/gda-attributes-manager.c \
- --c-include=$(top_srcdir)/libgda/gda-connection-internal.h \
--c-include=$(srcdir)/gda-connection-sqlite.h \
--c-include=$(top_srcdir)/libgda/gda-custom-marshal.c \
--c-include=$(srcdir)/gda-custom-marshal.h \
diff --git a/libgda/sql-parser/Makefile.am b/libgda/sql-parser/Makefile.am
index 95a3ae2..f1f0040 100644
--- a/libgda/sql-parser/Makefile.am
+++ b/libgda/sql-parser/Makefile.am
@@ -44,12 +44,12 @@ s-enum-types-h: @REBUILD@ $(libgda_sql_parser_headers) Makefile
( cd $(srcdir) && glib-mkenums \
--fhead "#ifndef __LIBGDA_SQL_PARSER_ENUM_TYPES_H__\n#define __LIBGDA_SQL_PARSER_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
--fprod "/* enumerations from \"@filename \" */\n" \
- --vhead "GType @enum_name _get_type (void);\n#define GDA_SQL_PARSER_TYPE_ ENUMSHORT@ (@enum_name _get_type())\n" \
+ --vhead "GType @enum_name _get_type (void);\n#define GDA_TYPE_ ENUMSHORT@ (@enum_name _get_type())\n" \
--ftail "G_END_DECLS\n\n#endif /* __LIBGDA_ENUM_TYPES_H__ */" \
$(libgda_sql_parser_headers)) > tmp-gda-enum-types.h \
&& (cmp -s tmp-gda-enum-types.h gda-sql-parser-enum-types.h || cp tmp-gda-enum-types.h gda-sql-parser-enum-types.h ) \
&& rm -f tmp-gda-enum-types.h \
- && cat gda-sql-parser-enum-types.h.KEEPAPI >> gda-sql-parser-enum-types.h \
+ && cat $(srcdir)/gda-sql-parser-enum-types.h.KEEPAPI >> gda-sql-parser-enum-types.h \
&& echo timestamp > $(@F)
gda-sql-parser-enum-types.c: s-enum-types-c
@@ -67,7 +67,7 @@ s-enum-types-c: @REBUILD@ $(libgda_sql_parser_headers) Makefile
$(libgda_sql_parser_headers)) > tmp-gda-enum-types.c \
&& (cmp -s tmp-gda-enum-types.c gda-sql-parser-enum-types.c || cp tmp-gda-enum-types.c gda-sql-parser-enum-types.c ) \
&& rm -f tmp-gda-enum-types.c \
- && cat gda-sql-parser-enum-types.c.KEEPAPI >> gda-sql-parser-enum-types.c \
+ && cat $(srcdir)/gda-sql-parser-enum-types.c.KEEPAPI >> gda-sql-parser-enum-types.c \
&& echo timestamp > $(@F)
# Generate the enums source code, with glib-mkenums:
diff --git a/libgda/sql-parser/gda-sql-parser-enum-types.h.KEEPAPI b/libgda/sql-parser/gda-sql-parser-enum-types.h.KEEPAPI
index 51ca494..4de1b6a 100644
--- a/libgda/sql-parser/gda-sql-parser-enum-types.h.KEEPAPI
+++ b/libgda/sql-parser/gda-sql-parser-enum-types.h.KEEPAPI
@@ -6,4 +6,14 @@
GType gda_sql_error_type_get_type (void);
#define GDA_SQL_PARSER_TYPE_SQL_ERROR_TYPE (gda_sql_error_type_get_type())
-#endif
\ No newline at end of file
+#define GDA_SQL_PARSER_TYPE_SQL_PARSER_ERROR (gda_sql_parser_error_get_type())
+#define GDA_SQL_PARSER_TYPE_SQL_PARSER_MODE (gda_sql_parser_mode_get_type())
+#define GDA_SQL_PARSER_TYPE_SQL_PARSER_FLAVOUR (gda_sql_parser_flavour_get_type())
+#define GDA_SQL_PARSER_TYPE_SQL_ERROR (gda_sql_error_get_type())
+#define GDA_SQL_PARSER_TYPE_SQL_STATEMENT_TYPE (gda_sql_statement_type_get_type())
+#define GDA_SQL_PARSER_TYPE_SQL_ANY_PART_TYPE (gda_sql_any_part_type_get_type())
+#define GDA_SQL_PARSER_TYPE_SQL_STATEMENT_COMPOUND_TYPE (gda_sql_statement_compound_type_get_type())
+#define GDA_SQL_PARSER_TYPE_SQL_OPERATOR_TYPE (gda_sql_operator_type_get_type())
+#define GDA_SQL_PARSER_TYPE_SQL_SELECT_JOIN_TYPE (gda_sql_select_join_type_get_type())
+
+#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]