[libgda] Removing warnings about introspection
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Removing warnings about introspection
- Date: Sat, 6 Apr 2019 15:18:31 +0000 (UTC)
commit 3c6ec42427d95c68b9937c461d06ffcca1dbf7eb
Author: Daniel Espinosa <esodan gmail com>
Date: Sat Apr 6 09:17:45 2019 -0600
Removing warnings about introspection
libgda/gda-column.h | 2 +-
libgda/gda-connection.c | 4 +-
libgda/gda-connection.h | 2 +-
libgda/gda-data-model-select.c | 1 -
libgda/gda-data-model.c | 2 +-
libgda/gda-data-select-private.h | 6 ++-
libgda/gda-value.c | 2 -
libgda/providers-support/gda-pstmt.c | 75 ++++++++++++++++++++++++++----------
8 files changed, 64 insertions(+), 30 deletions(-)
---
diff --git a/libgda/gda-column.h b/libgda/gda-column.h
index f5bba45a5..5c45b99d0 100644
--- a/libgda/gda-column.h
+++ b/libgda/gda-column.h
@@ -61,7 +61,7 @@ GdaColumn *gda_column_new (void);
GdaColumn *gda_column_copy (GdaColumn *column);
const gchar *gda_column_get_description (GdaColumn *column);
-void gda_column_set_description (GdaColumn *column, const gchar *title);
+void gda_column_set_description (GdaColumn *column, const gchar *descr);
const gchar *gda_column_get_name (GdaColumn *column);
void gda_column_set_name (GdaColumn *column, const gchar *name);
diff --git a/libgda/gda-connection.c b/libgda/gda-connection.c
index 1bf9d24f1..062c9c6cd 100644
--- a/libgda/gda-connection.c
+++ b/libgda/gda-connection.c
@@ -1098,7 +1098,7 @@ gda_connection_open_from_dsn_name (const gchar *dsn_name,
/**
* gda_connection_open_from_dsn:
- * @dsn_name: data sourcename.
+ * @dsn: data sourcename.
* @auth_string: (nullable): authentication string, or %NULL
* @options: options for the connection (see #GdaConnectionOptions).
* @error: a place to store an error, or %NULL
@@ -5248,7 +5248,7 @@ gda_connection_get_meta_store_data (GdaConnection *cnc,
}
/**
- * gda_connection_get_meta_store_data_v: (rename-to get_meta_store_data)
+ * gda_connection_get_meta_store_data_v: (rename-to gda_connection_get_meta_store_data)
* @cnc: a #GdaConnection object.
* @meta_type: describes which data to get.
* @error: a place to store errors, or %NULL
diff --git a/libgda/gda-connection.h b/libgda/gda-connection.h
index 92104ead9..f5f5a67cb 100644
--- a/libgda/gda-connection.h
+++ b/libgda/gda-connection.h
@@ -260,7 +260,7 @@ typedef enum {
} GdaConnectionMetaType;
-GdaConnection *gda_connection_open_from_dsn_name (const gchar *dsn,
+GdaConnection *gda_connection_open_from_dsn_name (const gchar *dsn_name,
const gchar *auth_string,
GdaConnectionOptions options,
GError **error);
diff --git a/libgda/gda-data-model-select.c b/libgda/gda-data-model-select.c
index b4d7f3427..40827375e 100644
--- a/libgda/gda-data-model-select.c
+++ b/libgda/gda-data-model-select.c
@@ -209,7 +209,6 @@ gda_data_model_select_new (GdaConnection *cnc, GdaStatement *stm, GdaSet *params
* gda_data_model_select_new_from_string:
* @cnc: an opened #GdaConnection
* @sql: a string representing a SELECT SQL to execute
- * @params: (nullable): a #GdaSet with the parameters to ejecute the SELECT SQL statement
*
* Returns: (transfer full): a new #GdaDataModelSelect object
*/
diff --git a/libgda/gda-data-model.c b/libgda/gda-data-model.c
index efecc7e77..c253ab708 100644
--- a/libgda/gda-data-model.c
+++ b/libgda/gda-data-model.c
@@ -1048,7 +1048,7 @@ gda_data_model_send_hint (GdaDataModel *model, GdaDataModelHint hint, const GVal
}
/**
- * gda_data_model_get_exceptions: (virtual get_exceptions)
+ * gda_data_model_get_exceptions:
* @model: a #GdaDataModel
*
* Get the global data model exception(s) that occurred when using @model.
diff --git a/libgda/gda-data-select-private.h b/libgda/gda-data-select-private.h
index 860aff0f8..fa0a3fec3 100644
--- a/libgda/gda-data-select-private.h
+++ b/libgda/gda-data-select-private.h
@@ -20,7 +20,11 @@
#ifndef __GDA_DATA_SELECT_PRIVATE_H__
#define __GDA_DATA_SELECT_PRIVATE_H__
-
+/**
+ * gda_data_select_get_prep_stmt:
+ *
+ * Returns: (transfer none):
+ */
GdaPStmt *gda_data_select_get_prep_stmt (GdaDataSelect *model);
gint gda_data_select_get_nb_stored_rows (GdaDataSelect *model);
gint gda_data_select_get_advertized_nrows (GdaDataSelect *model);
diff --git a/libgda/gda-value.c b/libgda/gda-value.c
index b252ebe43..d14b1d486 100644
--- a/libgda/gda-value.c
+++ b/libgda/gda-value.c
@@ -1647,7 +1647,6 @@ gda_time_new_from_values (gushort hour, gushort minute, gushort second, gulong f
* @fraction: fraction of seconds
* @timezone: timezone in seconds added to UTC
*
- * Returns: (transfer full): the a new value storing a time
* Since: 6.0
*/
void
@@ -1702,7 +1701,6 @@ gda_time_new_from_date_time (GDateTime *dt)
* gda_time_set_from_date_time:
* @dt: a #GDateTime to get time from
*
- * Returns: (transfer full): the a new value storing a time
* Since: 6.0
*/
void
diff --git a/libgda/providers-support/gda-pstmt.c b/libgda/providers-support/gda-pstmt.c
index 7c32840df..41b9a5687 100644
--- a/libgda/providers-support/gda-pstmt.c
+++ b/libgda/providers-support/gda-pstmt.c
@@ -239,6 +239,8 @@ gda_pstmt_get_gda_statement (GdaPStmt *pstmt)
/**
* gda_pstmt_get_sql:
* Actual SQL code used for this prepared statement, mem freed by GdaPStmt
+ *
+ * Returns: (transfer none): SQL command used
*/
gchar*
gda_pstmt_get_sql (GdaPStmt *pstmt) {
@@ -251,59 +253,82 @@ gda_pstmt_get_sql (GdaPStmt *pstmt) {
* Set SQL code used for this prepared statement, mem freed by GdaPStmt
*/
void
-gda_pstmt_set_sql (GdaPStmt *pstmt, const gchar *sql) {
- GdaPStmtPrivate *priv = gda_pstmt_get_instance_private (pstmt);
+gda_pstmt_set_sql (GdaPStmt *ps, const gchar *sql) {
+ g_return_if_fail (ps != NULL);
+ g_return_if_fail (GDA_IS_PSTMT (ps));
+ GdaPStmtPrivate *priv = gda_pstmt_get_instance_private (ps);
priv->sql = g_strdup (sql);
}
/**
- *gda_pstmt_get_param_ids:
+ * gda_pstmt_get_param_ids:
*
* List of parameters' IDs (as gchar *)
+ *
+ * Returns: (element-type utf8) (transfer none): a list of string with parameters ID's
*/
GSList*
-gda_pstmt_get_param_ids (GdaPStmt *pstmt) {
- GdaPStmtPrivate *priv = gda_pstmt_get_instance_private (pstmt);
+gda_pstmt_get_param_ids (GdaPStmt *ps) {
+ g_return_val_if_fail (ps != NULL, NULL);
+ g_return_val_if_fail (GDA_IS_PSTMT (ps), NULL);
+ GdaPStmtPrivate *priv = gda_pstmt_get_instance_private (ps);
return priv->param_ids;
}
/**
- *gda_pstmt_set_param_ids:
+ * gda_pstmt_set_param_ids:
+ * @ps: a #GdaPStmt
+ * @params: (element-type utf8) (transfer full): a list of strings with ID's to set
*
* List of parameters' IDs (as gchar *), list is stolen
*/
void
-gda_pstmt_set_param_ids (GdaPStmt *pstmt, GSList* params) {
- GdaPStmtPrivate *priv = gda_pstmt_get_instance_private (pstmt);
+gda_pstmt_set_param_ids (GdaPStmt *ps, GSList* params) {
+ g_return_if_fail (ps != NULL);
+ g_return_if_fail (GDA_IS_PSTMT (ps));
+ GdaPStmtPrivate *priv = gda_pstmt_get_instance_private (ps);
priv->param_ids = params;
}
/**
* gda_pstmt_get_ncols:
+ *
+ * Returns: number of columns or -1 if something is wrong
*/
gint
-gda_pstmt_get_ncols (GdaPStmt *pstmt) {
- GdaPStmtPrivate *priv = gda_pstmt_get_instance_private (pstmt);
+gda_pstmt_get_ncols (GdaPStmt *ps) {
+ g_return_val_if_fail (ps != NULL, -1);
+ g_return_val_if_fail (GDA_IS_PSTMT (ps), -1);
+ GdaPStmtPrivate *priv = gda_pstmt_get_instance_private (ps);
return priv->ncols;
}
/**
* gda_pstmt_get_types:
*
- * Set column's types for statement. @types is stalen and should
- * no be modified
+ * Set column's types for statement. @types will be stolen and should
+ * no be modified anymore.
+ *
+ * Returns: (array) (transfer none): an array of #GType used in the columns
*/
GType*
-gda_pstmt_get_types (GdaPStmt *pstmt) {
- GdaPStmtPrivate *priv = gda_pstmt_get_instance_private (pstmt);
+gda_pstmt_get_types (GdaPStmt *ps) {
+ g_return_val_if_fail (ps != NULL, NULL);
+ g_return_val_if_fail (GDA_IS_PSTMT (ps), NULL);
+ GdaPStmtPrivate *priv = gda_pstmt_get_instance_private (ps);
return priv->types;
}
/**
* gda_pstmt_set_cols:
+ * @ps: a #GdaPStmt
+ * @ncols: number of columns and size of given array
+ * @types: (array length=ncols) (transfer full): an array of types to use for each column
*
* Set column's types for statement. @types is stalen and should
* no be modified
*/
void
-gda_pstmt_set_cols (GdaPStmt *pstmt, gint ncols, GType *types) {
- GdaPStmtPrivate *priv = gda_pstmt_get_instance_private (pstmt);
+gda_pstmt_set_cols (GdaPStmt *ps, gint ncols, GType *types) {
+ g_return_if_fail (ps != NULL);
+ g_return_if_fail (GDA_IS_PSTMT (ps));
+ GdaPStmtPrivate *priv = gda_pstmt_get_instance_private (ps);
priv->ncols = ncols;
priv->types = types;
}
@@ -312,21 +337,29 @@ gda_pstmt_set_cols (GdaPStmt *pstmt, gint ncols, GType *types) {
*
* List of #GdaColumn objects which data models created from this
* prepared statement can copy
+ *
+ * Returns: (element-type Gda.Column) (transfer none): a list of #GdaColumn objects
*/
GSList*
-gda_pstmt_get_tmpl_columns (GdaPStmt *pstmt) {
- GdaPStmtPrivate *priv = gda_pstmt_get_instance_private (pstmt);
+gda_pstmt_get_tmpl_columns (GdaPStmt *ps) {
+ g_return_val_if_fail (ps != NULL, NULL);
+ g_return_val_if_fail (GDA_IS_PSTMT (ps), NULL);
+ GdaPStmtPrivate *priv = gda_pstmt_get_instance_private (ps);
return priv->tmpl_columns;
}
/**
- *gda_pstmt_set_tmpl_columns:
+ * gda_pstmt_set_tmpl_columns:
+ * @ps: a #GdaPStmt
+ * @columns: (element-type Gda.Column) (transfer full): a list of #GdaColumn
*
* Set the list of #GdaColumn objects which data models created from this
* prepared statement can copy. The list is stolen, so you should not
* free it.
*/
void
-gda_pstmt_set_tmpl_columns (GdaPStmt *pstmt, GSList* columns) {
- GdaPStmtPrivate *priv = gda_pstmt_get_instance_private (pstmt);
+gda_pstmt_set_tmpl_columns (GdaPStmt *ps, GSList* columns) {
+ g_return_if_fail (ps != NULL);
+ g_return_if_fail (GDA_IS_PSTMT (ps));
+ GdaPStmtPrivate *priv = gda_pstmt_get_instance_private (ps);
priv->tmpl_columns = columns;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]