[libgda] sql-parser: Enum Macros and get_type() functions: Fix the prefix.



commit 605f4e1c2b64e2382c28331468d23455654461d2
Author: Vivien Malerba <malerba gnome-db org>
Date:   Sun May 2 18:51:34 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/sql-parser/Makefile.am                      |    2 +-
 .../sql-parser/gda-sql-parser-enum-types.h.KEEPAPI |   12 +++++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/libgda/sql-parser/Makefile.am b/libgda/sql-parser/Makefile.am
index 37ab750..f1f0040 100644
--- a/libgda/sql-parser/Makefile.am
+++ b/libgda/sql-parser/Makefile.am
@@ -44,7 +44,7 @@ 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 ) \
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]