[libgda] GI: fixing annotations to remove warnings



commit e70068b08a6ad1ca4730a6d8ed1afa654266775b
Author: Daniel Espinosa <esodan gmail com>
Date:   Wed Jul 11 11:21:57 2018 -0500

    GI: fixing annotations to remove warnings

 libgda/gda-attributes-manager.c                |  4 +--
 libgda/gda-ddl-column.c                        |  1 -
 libgda/gda-ddl-creator.c                       |  5 ++-
 libgda/gda-ddl-fkey.c                          |  4 +--
 libgda/gda-ddl-table.c                         |  4 +--
 libgda/gda-ddl-table.h                         |  2 +-
 libgda/meson.build                             |  4 ++-
 libgda/sql-parser/gda-statement-struct-pspec.c | 10 +++---
 libgda/thread-wrapper/gda-worker.c             | 44 +++++++++++++-------------
 9 files changed, 39 insertions(+), 39 deletions(-)
---
diff --git a/libgda/gda-attributes-manager.c b/libgda/gda-attributes-manager.c
index b692de4d6..a572b0fda 100644
--- a/libgda/gda-attributes-manager.c
+++ b/libgda/gda-attributes-manager.c
@@ -91,7 +91,7 @@ objattrs_unref (ObjAttrs *attrs)
 /**
  * gda_attributes_manager_new:
  * @for_objects: set to TRUE if attributes will be set on objects.
- * @signal_func: (allow-none): a function to be called whenever an attribute changes on an object (if 
@for_objects is TRUE), or %NULL
+ * @signal_func: (allow-none) (scope call): a function to be called whenever an attribute changes on an 
object (if @for_objects is TRUE), or %NULL
  * @signal_data: user data passed as last argument of @signal_func when it is called
  *
  * Creates a new #GdaAttributesManager, which can store (name, value) attributes for pointers or GObject 
objects
@@ -293,7 +293,7 @@ gda_attributes_manager_set_full (GdaAttributesManager *mgr, gpointer ptr,
  *
  * Retrieves the value of an attribute previously set using gda_attributes_manager_set().
  *
- * Returns: (tranfer none): the attribute's value, or %NULL if the attribute is not set.
+ * Returns: (transfer none): the attribute's value, or %NULL if the attribute is not set.
  */
 const GValue *
 gda_attributes_manager_get (GdaAttributesManager *mgr, gpointer ptr, const gchar *att_name)
diff --git a/libgda/gda-ddl-column.c b/libgda/gda-ddl-column.c
index 53aff6a47..b5863c3be 100644
--- a/libgda/gda-ddl-column.c
+++ b/libgda/gda-ddl-column.c
@@ -1044,7 +1044,6 @@ gda_ddl_column_prepare_create  (GdaDdlColumn *self,
  * gda_ddl_column_prepare_add:
  * @self: a #GdaDdlColumn instance
  * @op: #GdaServerOperation to add information
- * @order: column order number
  * @error: error storage container
  *
  * Populate @op with information stored in @self. This method is used to
diff --git a/libgda/gda-ddl-creator.c b/libgda/gda-ddl-creator.c
index d7e372aec..cb311de63 100644
--- a/libgda/gda-ddl-creator.c
+++ b/libgda/gda-ddl-creator.c
@@ -429,7 +429,7 @@ on_error:
  * gda_ddl_creator_get_tables:
  * @self: a #GdaDdlCreator object
  *
- * Returns: a list of tables
+ * Returns: (element-type Gda.DdlTable) (transfer none): a list of tables
  *
  * Since: 6.0
  */
@@ -444,7 +444,7 @@ gda_ddl_creator_get_tables (GdaDdlCreator *self)
  * gda_ddl_creator_get_views:
  * @self: a #GdaDdlCreator object
  *
- * Returns: a list of views
+ * Returns: (element-type Gda.DdlView) (transfer none): a list of views
  *
  * Since: 6.0
  */
@@ -658,7 +658,6 @@ gda_ddl_creator_append_view (GdaDdlCreator *self,
  * gda_ddl_creator_perform_operation:
  * @self: a #GdaDdlCreator object
  * @cnc: a connection object to work with
- * @mode: mode of operation
  * @error: object to store error
  *
  * After population @self with all data this method may be
diff --git a/libgda/gda-ddl-fkey.c b/libgda/gda-ddl-fkey.c
index 3872b96e0..520a83c70 100644
--- a/libgda/gda-ddl-fkey.c
+++ b/libgda/gda-ddl-fkey.c
@@ -518,7 +518,7 @@ gda_ddl_fkey_set_ref_table (GdaDdlFkey *self,
  * gda_ddl_fkey_get_field_name:
  * @self: a #GdaDdlFkey object
  *
- * Returns: A const #GList of strings where each string
+ * Returns: (element-type utf8) (transfer none): A const #GList of strings where each string
  * corresponds to a foreign key field or %NULL.
  *
  * Since: 6.0
@@ -537,7 +537,7 @@ gda_ddl_fkey_get_field_name (GdaDdlFkey *self)
  * gda_ddl_fkey_get_ref_field:
  * @self: a #GdaDdlFkey object
  *
- * Returns: (transfer none): A #GList of strings where each string corresponds
+ * Returns: (element-type utf8) (transfer none): A #GList of strings where each string corresponds
  * to a foreign key reference field or %NULL.
  *
  * Since: 6.0
diff --git a/libgda/gda-ddl-table.c b/libgda/gda-ddl-table.c
index 7ef44bf50..0ba4f943f 100644
--- a/libgda/gda-ddl-table.c
+++ b/libgda/gda-ddl-table.c
@@ -395,7 +395,7 @@ gda_ddl_table_is_valid (GdaDdlTable *self)
  * Use this method to obtain internal list of all columns. The internal list
  * should not be freed.
  *
- * Returns: A list of #GdaDdlColumn objects or %NULL if the internal list is
+ * Returns: (element-type Gda.DdlColumn) (transfer none): A list of #GdaDdlColumn objects or %NULL if the 
internal list is
  * not set or if %NULL is passed.
  *
  * Since: 6.0
@@ -416,7 +416,7 @@ gda_ddl_table_get_columns (GdaDdlTable *self)
  * Use this method to obtain internal list of all fkeys. The internal list
  * should not be freed.
  *
- * Returns: A list of #GdaDdlFkey objects or %NULL if the internal list is not
+ * Returns: (element-type Gda.DdlFkey): A list of #GdaDdlFkey objects or %NULL if the internal list is not
  * set or %NULL is passed
  *
  * Since: 6.0
diff --git a/libgda/gda-ddl-table.h b/libgda/gda-ddl-table.h
index f63648ec1..c85636568 100644
--- a/libgda/gda-ddl-table.h
+++ b/libgda/gda-ddl-table.h
@@ -57,7 +57,7 @@ void            gda_ddl_table_append_column     (GdaDdlTable *self,
 
 gboolean        gda_ddl_table_is_temp           (GdaDdlTable *self);
 void            gda_ddl_table_set_temp          (GdaDdlTable *self,
-                                                 gboolean status);
+                                                 gboolean istemp);
 
 gboolean        gda_ddl_table_prepare_create (GdaDdlTable *self,
                                               GdaServerOperation *op,
diff --git a/libgda/meson.build b/libgda/meson.build
index 96bcb8020..89f2cab12 100644
--- a/libgda/meson.build
+++ b/libgda/meson.build
@@ -124,6 +124,7 @@ libgda_headers_all += [
        ]
 
 libgda_sources= files([
+       'gda-attributes-manager.c',
        'gda-batch.c',
        'gda-blob-op.c',
        'gda-blob-op-impl.h',
@@ -184,7 +185,6 @@ libgda_source_all = files([
        'libcsv.c',
        'dir-blob-op.h',
        'dir-blob-op.c',
-       'gda-attributes-manager.c',
        'gda-debug-macros.h',
        'gda-connection-internal.h',
        'gda-connection-sqlite.h',
@@ -265,7 +265,9 @@ gnome_module.generate_gir(libgda,
        nsversion: project_api_version,
        header: 'libgda.h',
        includes: [
+               'GLib-2.0',
                'GObject-2.0',
+               'Gio-2.0',
                'libxml2-2.0'
                ],
        dependencies: libgda_dep,
diff --git a/libgda/sql-parser/gda-statement-struct-pspec.c b/libgda/sql-parser/gda-statement-struct-pspec.c
index 7dcaf6656..3baf9d733 100644
--- a/libgda/sql-parser/gda-statement-struct-pspec.c
+++ b/libgda/sql-parser/gda-statement-struct-pspec.c
@@ -122,7 +122,7 @@ gda_sql_param_spec_take_type (GdaSqlParamSpec *pspec, GValue *value)
 
 /**
  * gda_sql_param_spec_new:
- * @value: (transfer full): a G_TYPE_STRING #GValue
+ * @simple_spec: (transfer full): a G_TYPE_STRING #GValue
  *
  * @value must contain a string representing a variable, see the documentation associated to the
  * #GdaSqlParser object.
@@ -132,7 +132,7 @@ gda_sql_param_spec_take_type (GdaSqlParamSpec *pspec, GValue *value)
  * Returns: (transfer full): a new #GdaSqlParamSpec
  */
 GdaSqlParamSpec *
-gda_sql_param_spec_new (GValue *value)
+gda_sql_param_spec_new (GValue *simple_spec)
 {
        GdaSqlParamSpec *pspec;
 
@@ -141,8 +141,8 @@ gda_sql_param_spec_new (GValue *value)
        pspec->nullok = FALSE;
        pspec->g_type = GDA_TYPE_NULL;
 
-       if (value) {
-               gchar *str = (gchar *) g_value_get_string (value);
+       if (simple_spec) {
+               gchar *str = (gchar *) g_value_get_string (simple_spec);
                gchar *ptr;
                gint part; /* 0 for name, 1 for type and 2 for NULL */
                ptr = str;
@@ -171,7 +171,7 @@ gda_sql_param_spec_new (GValue *value)
                                str = ptr;
                        }
                }
-               gda_value_free (value);
+               gda_value_free (simple_spec);
        }
 
        return pspec;
diff --git a/libgda/thread-wrapper/gda-worker.c b/libgda/thread-wrapper/gda-worker.c
index b1cf24b55..a72412bdf 100644
--- a/libgda/thread-wrapper/gda-worker.c
+++ b/libgda/thread-wrapper/gda-worker.c
@@ -433,7 +433,7 @@ _gda_worker_bg_unref (GdaWorker *worker)
 
 /**
  * gda_worker_unref:
- * @worker: (allow-none): a #GdaWorker, or %NULL
+ * @worker: (nullable): a #GdaWorker, or %NULL
  *
  * Decreases @worker's reference count. When reference count reaches %0, then the
  * object is destroyed, note that in this case this function only returns when the
@@ -489,12 +489,12 @@ _gda_worker_submit_job_with_its (GdaWorker *worker, ITSignaler *reply_its, GdaWo
 /**
  * gda_worker_submit_job:
  * @worker: a #GdaWorker object
- * @callback_context: (allow-none): a #GMainContext, or %NULL (ignored if no setting has been defined with 
gda_worker_set_callback())
+ * @callback_context: (nullable): a #GMainContext, or %NULL (ignored if no setting has been defined with 
gda_worker_set_callback())
  * @func: the function to call from the worker thread
- * @data: (allow-none): the data to pass to @func, or %NULL
- * @data_destroy_func: (allow-none): a function to destroy @data, or %NULL
- * @result_destroy_func: (allow-none): a function to destroy the result, if any, of the execution of @func, 
or %NULL
- * @error: (allow-none): a place to store errors, or %NULL.
+ * @data: (nullable): the data to pass to @func, or %NULL
+ * @data_destroy_func: (nullable): a function to destroy @data, or %NULL
+ * @result_destroy_func: (nullable): a function to destroy the result, if any, of the execution of @func, or 
%NULL
+ * @error: (nullable): a place to store errors, or %NULL.
  *
  * Request that the worker thread call @func with the @data argument.
  *
@@ -555,8 +555,8 @@ gda_worker_submit_job (GdaWorker *worker, GMainContext *callback_context, GdaWor
  * gda_worker_fetch_job_result:
  * @worker: a #GdaWorker object
  * @job_id: the ID of the job, as returned by gda_worker_submit_job()
- * @out_result: (allow-none): a place to store the value returned by the execution of the requested function 
within the worker thread, or %NULL
- * @error: (allow-none): a place to store errors, or %NULL
+ * @out_result: (nullable): a place to store the value returned by the execution of the requested function 
within the worker thread, or %NULL
+ * @error: (nullable): a place to store errors, or %NULL
  *
  * Fetch the value returned by execution the @job_id job.
  *
@@ -629,7 +629,7 @@ gda_worker_fetch_job_result (GdaWorker *worker, guint job_id, gpointer *out_resu
  * gda_worker_cancel_job:
  * @worker: a #GdaWorker object
  * @job_id: the ID of the job, as returned by gda_worker_submit_job()
- * @error: (allow-none): a place to store errors, or %NULL
+ * @error: (nullable): a place to store errors, or %NULL
  *
  * Cancels a job which has not yet been processed. If the job cannot be found, is being processed or has 
already been processed,
  * then this function returns %FALSE.
@@ -734,10 +734,10 @@ dc_callback (ITSignaler *its, DeclaredCallback *dc)
 /**
  * gda_worker_set_callback:
  * @worker: a #GdaWorker object
- * @context: (allow-none): a #GMainContext, or %NULL
- * @callback: (allow-none): the function to call when a job submitted from within the calling thread using 
gda_worker_submit_job() has finished being processed.
+ * @context: (nullable): a #GMainContext, or %NULL
+ * @callback: (nullable) (scope call): the function to call when a job submitted from within the calling 
thread using gda_worker_submit_job() has finished being processed.
  * @user_data: argument passed to @callback
- * @error: (allow-none): a place to store errors, or %NULL
+ * @error: (nullable): a place to store errors, or %NULL
  *
  * Declare a callback function to be called when a job has been processed. If @callback is %NULL, then any 
previously
  * effect of this function is removed. If the same function is called with a different @callback value, then 
the previous one
@@ -851,15 +851,15 @@ do_itsignaler_cb (ITSignaler *its, GMainLoop *loop)
 /**
  * gda_worker_do_job:
  * @worker: a #GdaWorker object
- * @context: (allow-none): a #GMainContext to execute a main loop in (while waiting), or %NULL
+ * @context: (nullable): a #GMainContext to execute a main loop in (while waiting), or %NULL
  * @timeout_ms: the maximum number of milisecons to wait before returning, or %0 for unlimited wait
- * @out_result: (allow-none): a place to store the result, if any, of @func's execution, or %NULL
- * @out_job_id: (allow-none): a place to store the ID of the job having been submitted, or %NULL
+ * @out_result: (nullable): a place to store the result, if any, of @func's execution, or %NULL
+ * @out_job_id: (nullable): a place to store the ID of the job having been submitted, or %NULL
  * @func: the function to call from the worker thread
- * @data: (allow-none): the data to pass to @func, or %NULL
- * @data_destroy_func: (allow-none): a function to destroy @data, or %NULL
- * @result_destroy_func: (allow-none): a function to destroy the result, if any, of @func's execution, or 
%NULL
- * @error: (allow-none): a place to store errors, or %NULL.
+ * @data: (nullable): the data to pass to @func, or %NULL
+ * @data_destroy_func: (nullable): a function to destroy @data, or %NULL
+ * @result_destroy_func: (nullable): a function to destroy the result, if any, of @func's execution, or %NULL
+ * @error: (nullable): a place to store errors, or %NULL.
  *
  * Request that the worker thread call @func with the @data argument, much like gda_worker_submit_job(),
  * but waits (starting a #GMainLoop) for a maximum of @timeout_ms miliseconds for @func to be executed.
@@ -1026,9 +1026,9 @@ gda_worker_do_job (GdaWorker *worker, GMainContext *context, gint timeout_ms,
  * gda_worker_wait_job:
  * @worker: a #GdaWorker object
  * @func: the function to call from the worker thread
- * @data: (allow-none): the data to pass to @func, or %NULL
- * @data_destroy_func: (allow-none): a function to destroy @data, or %NULL
- * @error: (allow-none): a place to store errors, or %NULL.
+ * @data: (nullable): the data to pass to @func, or %NULL
+ * @data_destroy_func: (nullable): a function to destroy @data, or %NULL
+ * @error: (nullable): a place to store errors, or %NULL.
  *
  * Request that the worker thread call @func with the @data argument, much like gda_worker_submit_job(),
  * but waits (blocks) until @func has been executed.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]