[libgda] More work for bug #669801
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] More work for bug #669801
- Date: Thu, 1 Nov 2012 15:56:08 +0000 (UTC)
commit 9a65c47543f024a63276ec2255ac1677fec54d72
Author: Vivien Malerba <malerba gnome-db org>
Date: Thu Nov 1 16:27:10 2012 +0100
More work for bug #669801
libgda/gda-data-model-dsn-list.c | 2 +-
libgda/gda-data-model-dsn-list.h | 4 ++--
libgda/gda-data-model-iter.c | 2 ++
libgda/gda-data-model-iter.h | 1 +
libgda/gda-holder.c | 2 +-
libgda/gda-holder.h | 2 ++
libgda/gda-meta-struct-io.c | 3 ++-
libgda/gda-meta-struct-private.h | 2 --
libgda/gda-meta-struct.h | 3 +++
libgda/libgda.symbols | 8 --------
libgda/sql-parser/delimiter.y | 2 +-
libgda/sql-parser/gda-sql-parser.c | 32 ++++++++++++++++----------------
libgda/sql-parser/parser.y | 2 +-
13 files changed, 32 insertions(+), 33 deletions(-)
---
diff --git a/libgda/gda-data-model-dsn-list.c b/libgda/gda-data-model-dsn-list.c
index 29d052a..fd784f8 100644
--- a/libgda/gda-data-model-dsn-list.c
+++ b/libgda/gda-data-model-dsn-list.c
@@ -226,7 +226,7 @@ dsn_changed_cb (G_GNUC_UNUSED GdaConfig *conf, GdaDsnInfo *info, GdaDataModelDsn
*/
GType
-gda_data_model_dsn_list_get_type (void)
+_gda_data_model_dsn_list_get_type (void)
{
static GType type = 0;
diff --git a/libgda/gda-data-model-dsn-list.h b/libgda/gda-data-model-dsn-list.h
index cbdab72..ccd0653 100644
--- a/libgda/gda-data-model-dsn-list.h
+++ b/libgda/gda-data-model-dsn-list.h
@@ -25,7 +25,7 @@
G_BEGIN_DECLS
-#define GDA_TYPE_DATA_MODEL_DSN_LIST (gda_data_model_dsn_list_get_type())
+#define GDA_TYPE_DATA_MODEL_DSN_LIST (_gda_data_model_dsn_list_get_type())
#define GDA_DATA_MODEL_DSN_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, GDA_TYPE_DATA_MODEL_DSN_LIST, GdaDataModelDsnList))
#define GDA_DATA_MODEL_DSN_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, GDA_TYPE_DATA_MODEL_DSN_LIST, GdaDataModelDsnListClass))
#define GDA_IS_DATA_MODEL_DSN_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, GDA_TYPE_DATA_MODEL_DSN_LIST))
@@ -50,7 +50,7 @@ struct _GdaDataModelDsnListClass {
void (*_gda_reserved4) (void);
};
-GType gda_data_model_dsn_list_get_type (void) G_GNUC_CONST;
+GType _gda_data_model_dsn_list_get_type (void) G_GNUC_CONST;
G_END_DECLS
diff --git a/libgda/gda-data-model-iter.c b/libgda/gda-data-model-iter.c
index 03bf543..7cd4b48 100644
--- a/libgda/gda-data-model-iter.c
+++ b/libgda/gda-data-model-iter.c
@@ -1010,6 +1010,8 @@ gda_data_model_iter_is_valid (GdaDataModelIter *iter)
* represented by the @param parameter
*
* Returns: the column number, or @param is not valid
+ *
+ * Deprecated: 5.2: not very useful
*/
gint
gda_data_model_iter_get_column_for_param (GdaDataModelIter *iter, GdaHolder *param)
diff --git a/libgda/gda-data-model-iter.h b/libgda/gda-data-model-iter.h
index 0237d90..e2c369c 100644
--- a/libgda/gda-data-model-iter.h
+++ b/libgda/gda-data-model-iter.h
@@ -142,6 +142,7 @@ void gda_data_model_iter_invalidate_contents (GdaDataModelIter *it
gboolean gda_data_model_iter_is_valid (GdaDataModelIter *iter);
GdaHolder *gda_data_model_iter_get_holder_for_field (GdaDataModelIter *iter, gint col);
+gint gda_data_model_iter_get_column_for_param (GdaDataModelIter *iter, GdaHolder *param);
#define gda_data_model_iter_move_at_row gda_data_model_iter_move_to_row
diff --git a/libgda/gda-holder.c b/libgda/gda-holder.c
index 0857463..6d6cfd4 100644
--- a/libgda/gda-holder.c
+++ b/libgda/gda-holder.c
@@ -1986,7 +1986,7 @@ gda_holder_get_bind (GdaHolder *holder)
*
* This method is just a wrapper around the gda_text_to_alphanum() function.
*
- * Returns: a new string
+ * Returns: (transfer full): a new string
*/
gchar *
gda_holder_get_alphanum_id (GdaHolder *holder)
diff --git a/libgda/gda-holder.h b/libgda/gda-holder.h
index e002c24..402a80f 100644
--- a/libgda/gda-holder.h
+++ b/libgda/gda-holder.h
@@ -90,6 +90,8 @@ GdaHolder *gda_holder_copy (GdaHolder *orig);
GType gda_holder_get_g_type (GdaHolder *holder);
const gchar *gda_holder_get_id (GdaHolder *holder);
+gchar * gda_holder_get_alphanum_id (GdaHolder *holder);
+
/**
* gda_holder_new_string:
diff --git a/libgda/gda-meta-struct-io.c b/libgda/gda-meta-struct-io.c
index 87dad6a..f521cd7 100644
--- a/libgda/gda-meta-struct-io.c
+++ b/libgda/gda-meta-struct-io.c
@@ -46,7 +46,8 @@ static GdaMetaDbObject *create_view_object (GdaMetaStruct *mstruct, const GValue
* @xml_spec_file: the specifications as the name of an XML file
* @error: (allow-none): a place to store errors, or %NULL
*
- * Loads an XML description into @mstruct
+ * Loads an XML description into @mstruct. This method is still experimental and no description
+ * the XML file structure is given, and no guarantee that it will remain as it is given.
*
* returns: TRUE if no error has occurred
*/
diff --git a/libgda/gda-meta-struct-private.h b/libgda/gda-meta-struct-private.h
index f1216e1..d3fdafd 100644
--- a/libgda/gda-meta-struct-private.h
+++ b/libgda/gda-meta-struct-private.h
@@ -29,8 +29,6 @@
G_BEGIN_DECLS
GdaMetaDbObject *_gda_meta_struct_add_db_object (GdaMetaStruct *mstruct, GdaMetaDbObject *dbo, GError **error);
-gboolean gda_meta_struct_load_from_xml_file (GdaMetaStruct *mstruct, const gchar *catalog, const gchar *schema,
- const gchar *xml_spec_file, GError **error);
G_END_DECLS
diff --git a/libgda/gda-meta-struct.h b/libgda/gda-meta-struct.h
index 1b5f2e6..173063b 100644
--- a/libgda/gda-meta-struct.h
+++ b/libgda/gda-meta-struct.h
@@ -492,6 +492,9 @@ typedef struct {
GType gda_meta_struct_get_type (void) G_GNUC_CONST;
GdaMetaStruct *gda_meta_struct_new (GdaMetaStore *store, GdaMetaStructFeature features);
+gboolean gda_meta_struct_load_from_xml_file (GdaMetaStruct *mstruct, const gchar *catalog,
+ const gchar *schema,
+ const gchar *xml_spec_file, GError **error);
GdaMetaDbObject *gda_meta_struct_complement (GdaMetaStruct *mstruct, GdaMetaDbObjectType type,
const GValue *catalog, const GValue *schema, const GValue *name,
GError **error);
diff --git a/libgda/libgda.symbols b/libgda/libgda.symbols
index c25469c..01ccb87 100644
--- a/libgda/libgda.symbols
+++ b/libgda/libgda.symbols
@@ -689,10 +689,6 @@
gda_sql_case_free
gda_sql_case_new
gda_sql_case_serialize
- gda_sql_delimiter
- gda_sql_delimiterAlloc
- gda_sql_delimiterFree
- gda_sql_delimiterTrace
gda_sql_error_get_type
gda_sql_error_quark
gda_sql_expr_copy
@@ -733,12 +729,9 @@
gda_sql_param_spec_take_name
gda_sql_param_spec_take_nullok
gda_sql_param_spec_take_type
- gda_sql_parser
- gda_sql_parserAlloc
gda_sql_parser_error_get_type
gda_sql_parser_error_quark
gda_sql_parser_flavour_get_type
- gda_sql_parserFree
gda_sql_parser_get_type
gda_sql_parser_mode_get_type
gda_sql_parser_new
@@ -747,7 +740,6 @@
gda_sql_parser_parse_string_as_batch
gda_sql_parser_set_overflow_error
gda_sql_parser_set_syntax_error
- gda_sql_parserTrace
gda_sql_select_field_copy
gda_sql_select_field_free
gda_sql_select_field_new
diff --git a/libgda/sql-parser/delimiter.y b/libgda/sql-parser/delimiter.y
index 7976ae8..3cb93c5 100644
--- a/libgda/sql-parser/delimiter.y
+++ b/libgda/sql-parser/delimiter.y
@@ -28,7 +28,7 @@
// The name of the generated procedure that implements the parser
// is as follows:
-%name gda_sql_delimiter
+%name priv_gda_sql_delimiter
// The following text is included near the beginning of the C source
// code file that implements the parser.
diff --git a/libgda/sql-parser/gda-sql-parser.c b/libgda/sql-parser/gda-sql-parser.c
index c1a57bc..778b0fe 100644
--- a/libgda/sql-parser/gda-sql-parser.c
+++ b/libgda/sql-parser/gda-sql-parser.c
@@ -70,15 +70,15 @@ static void merge_tokenizer_contexts (GdaSqlParser *parser, gint n_contexts);
/*
* The interface to the LEMON-generated parser
*/
-void *gda_sql_delimiterAlloc (void*(*)(size_t));
-void gda_sql_delimiterFree (void*, void(*)(void*));
-void gda_sql_delimiterTrace (void*, char *);
-void gda_sql_delimiter (void*, int, GValue *, GdaSqlParserIface *);
+void *priv_gda_sql_delimiterAlloc (void*(*)(size_t));
+void priv_gda_sql_delimiterFree (void*, void(*)(void*));
+void priv_gda_sql_delimiterTrace (void*, char *);
+void priv_gda_sql_delimiter (void*, int, GValue *, GdaSqlParserIface *);
-void *gda_sql_parserAlloc (void*(*)(size_t));
-void gda_sql_parserFree (void*, void(*)(void*));
-void gda_sql_parserTrace (void*, char *);
-void gda_sql_parser (void*, int, GValue *, GdaSqlParserIface *);
+void *priv_gda_sql_parserAlloc (void*(*)(size_t));
+void priv_gda_sql_parserFree (void*, void(*)(void*));
+void priv_gda_sql_parserTrace (void*, char *);
+void priv_gda_sql_parser (void*, int, GValue *, GdaSqlParserIface *);
/* signals */
@@ -240,11 +240,11 @@ gda_sql_parser_init (GdaSqlParser *parser)
if (klass->delim_alloc)
parser->priv->lemon_delimiter = klass->delim_alloc ((void*(*)(size_t)) g_malloc);
else
- parser->priv->lemon_delimiter = gda_sql_delimiterAlloc ((void*(*)(size_t)) g_malloc);
+ parser->priv->lemon_delimiter = priv_gda_sql_delimiterAlloc ((void*(*)(size_t)) g_malloc);
if (klass->parser_alloc)
parser->priv->lemon_parser = klass->parser_alloc ((void*(*)(size_t)) g_malloc);
else
- parser->priv->lemon_parser = gda_sql_parserAlloc ((void*(*)(size_t)) g_malloc);
+ parser->priv->lemon_parser = priv_gda_sql_parserAlloc ((void*(*)(size_t)) g_malloc);
parser->priv->mode = GDA_SQL_PARSER_MODE_PARSE;
parser->priv->flavour = GDA_SQL_PARSER_FLAVOUR_STANDARD;
@@ -317,13 +317,13 @@ gda_sql_parser_finalize (GObject *object)
klass->delim_free (parser->priv->lemon_delimiter, g_free);
}
else
- gda_sql_delimiterFree (parser->priv->lemon_delimiter, g_free);
+ priv_gda_sql_delimiterFree (parser->priv->lemon_delimiter, g_free);
if (klass->parser_alloc) {
g_assert (klass->parser_free);
klass->parser_free (parser->priv->lemon_parser, g_free);
}
else
- gda_sql_parserFree (parser->priv->lemon_parser, g_free);
+ priv_gda_sql_parserFree (parser->priv->lemon_parser, g_free);
g_array_free (parser->priv->passed_tokens, TRUE);
@@ -367,7 +367,7 @@ gda_sql_parser_set_property (GObject *object,
stdout : NULL, ".......DELIMITER DEBUG:");
}
else
- gda_sql_delimiterTrace ((parser->priv->mode == GDA_SQL_PARSER_MODE_DELIMIT) && debug ?
+ priv_gda_sql_delimiterTrace ((parser->priv->mode == GDA_SQL_PARSER_MODE_DELIMIT) && debug ?
stdout : NULL, ".......DELIMITER DEBUG:");
if (klass->parser_alloc) {
g_assert (klass->parser_trace);
@@ -375,7 +375,7 @@ gda_sql_parser_set_property (GObject *object,
stdout : NULL, ".......PARSE DEBUG:");
}
else
- gda_sql_parserTrace ((parser->priv->mode == GDA_SQL_PARSER_MODE_PARSE) && debug ?
+ priv_gda_sql_parserTrace ((parser->priv->mode == GDA_SQL_PARSER_MODE_PARSE) && debug ?
stdout : NULL, ".......PARSE DEBUG:");
break;
}
@@ -443,8 +443,8 @@ gda_sql_parser_parse_string (GdaSqlParser *parser, const gchar *sql, const gchar
gint ntokens = 0;
GdaSqlParserMode parse_mode;
GdaSqlParserClass *klass;
- void (*_delimit) (void*, int, GValue *, GdaSqlParserIface *) = gda_sql_delimiter;
- void (*_parse) (void*, int, GValue *, GdaSqlParserIface *) = gda_sql_parser;
+ void (*_delimit) (void*, int, GValue *, GdaSqlParserIface *) = priv_gda_sql_delimiter;
+ void (*_parse) (void*, int, GValue *, GdaSqlParserIface *) = priv_gda_sql_parser;
gint *delim_trans = delim_tokens;
gint *parser_trans= parser_tokens;
diff --git a/libgda/sql-parser/parser.y b/libgda/sql-parser/parser.y
index e87fe62..3c61782 100644
--- a/libgda/sql-parser/parser.y
+++ b/libgda/sql-parser/parser.y
@@ -28,7 +28,7 @@
// The name of the generated procedure that implements the parser
// is as follows:
-%name gda_sql_parser
+%name priv_gda_sql_parser
// The following text is included near the beginning of the C source
// code file that implements the parser.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]