summaryrefslogtreecommitdiff
path: root/gck
diff options
context:
space:
mode:
authorNiels De Graef <nielsdegraef@gmail.com>2019-12-23 10:33:27 +0100
committerNiels De Graef <nielsdegraef@gmail.com>2020-01-03 17:03:23 +0100
commitf7ad66e0da1d380b2f3f62b76398386ad1d21b19 (patch)
treed54a489219a4bf5b2a36eb1f86664d8e03250315 /gck
parent259080ea8e8c12652065b0041c779a450abfbddc (diff)
downloadgcr-f7ad66e0da1d380b2f3f62b76398386ad1d21b19.tar.gz
Don't use deprecated (allow-none) GIR annotation
It should be replaced with either `(optional)`, `(nullable)`, or in some cases both.
Diffstat (limited to 'gck')
-rw-r--r--gck/gck-attributes.c12
-rw-r--r--gck/gck-enumerator.c10
-rw-r--r--gck/gck-module.c6
-rw-r--r--gck/gck-modules.c6
-rw-r--r--gck/gck-object-cache.c4
-rw-r--r--gck/gck-session.c44
6 files changed, 41 insertions, 41 deletions
diff --git a/gck/gck-attributes.c b/gck/gck-attributes.c
index f3f04ff..aa2fd75 100644
--- a/gck/gck-attributes.c
+++ b/gck/gck-attributes.c
@@ -427,7 +427,7 @@ gck_builder_copy (GckBuilder *builder)
* gck_builder_take_data:
* @builder: the builder
* @attr_type: the new attribute type
- * @value: (transfer full) (array length=length) (allow-none): the new
+ * @value: (transfer full) (array length=length) (nullable): the new
* attribute memory
* @length: the length of the memory
*
@@ -476,7 +476,7 @@ gck_builder_take_data (GckBuilder *builder,
* gck_builder_add_data:
* @builder: the builder
* @attr_type: the new attribute type
- * @value: (array length=length) (allow-none): the new attribute memory
+ * @value: (array length=length) (nullable): the new attribute memory
* @length: the length of the memory
*
* Add a new attribute to the builder with an arbitrary value. Unconditionally
@@ -517,7 +517,7 @@ gck_builder_add_data (GckBuilder *builder,
* gck_builder_set_data:
* @builder: the builder
* @attr_type: the attribute type
- * @value: (array length=length) (allow-none): the new attribute memory
+ * @value: (array length=length) (nullable): the new attribute memory
* @length: the length of the memory
*
* Set a new attribute to the builder with an arbitrary value. If an attribute
@@ -778,7 +778,7 @@ gck_builder_set_date (GckBuilder *builder,
* gck_builder_add_string:
* @builder: the builder
* @attr_type: the new attribute type
- * @value: (allow-none): the attribute value
+ * @value: (nullable): the attribute value
*
* Add a new attribute to the builder for the string @value or %NULL.
* Unconditionally adds a new attribute, even if one with the same @attr_type
@@ -1460,7 +1460,7 @@ gck_attribute_get_ulong (const GckAttribute *attr)
* to this function unless you're know it's supposed to contain
* a value of the right type.
*
- * Return value: (allow-none): a null terminated string, to be freed with
+ * Return value: (nullable): a null terminated string, to be freed with
* g_free(), or %NULL if the value was invalid
*/
gchar*
@@ -2322,7 +2322,7 @@ gck_attributes_ref_sink (GckAttributes *attrs)
/**
* gck_attributes_unref:
- * @attrs: (allow-none) (type Gck.Attributes): An attribute array
+ * @attrs: (nullable) (type Gck.Attributes): An attribute array
*
* Unreference this attribute array.
*
diff --git a/gck/gck-enumerator.c b/gck/gck-enumerator.c
index 3921822..f35a191 100644
--- a/gck/gck-enumerator.c
+++ b/gck/gck-enumerator.c
@@ -918,7 +918,7 @@ gck_enumerator_set_object_type_full (GckEnumerator *self,
* Get the enumerator that will be run after all objects from this one
* are seen.
*
- * Returns: (transfer full) (allow-none): the chained enumerator or %NULL
+ * Returns: (transfer full) (nullable): the chained enumerator or %NULL
*/
GckEnumerator *
gck_enumerator_get_chained (GckEnumerator *self)
@@ -940,7 +940,7 @@ gck_enumerator_get_chained (GckEnumerator *self)
/**
* gck_enumerator_set_chained:
* @self: the enumerator
- * @chained: (allow-none): the chained enumerator or %NULL
+ * @chained: (nullable): the chained enumerator or %NULL
*
* Set a chained enumerator that will be run after all objects from this one
* are seen.
@@ -975,7 +975,7 @@ gck_enumerator_set_chained (GckEnumerator *self,
*
* Get the interaction used when a pin is needed
*
- * Returns: (transfer full) (allow-none): the interaction or %NULL
+ * Returns: (transfer full) (nullable): the interaction or %NULL
*/
GTlsInteraction *
gck_enumerator_get_interaction (GckEnumerator *self)
@@ -997,7 +997,7 @@ gck_enumerator_get_interaction (GckEnumerator *self)
/**
* gck_enumerator_set_interaction:
* @self: the enumerator
- * @interaction: (allow-none): the interaction or %NULL
+ * @interaction: (nullable): the interaction or %NULL
*
* Set the interaction used when a pin is needed
*/
@@ -1181,7 +1181,7 @@ extract_results (GckEnumeratorState *state,
* %NULL is also returned if the function fails. Use the @error to determine
* whether a failure occurred or not.
*
- * Returns: (transfer full) (allow-none): The next object, which must be released
+ * Returns: (transfer full) (nullable): The next object, which must be released
* using g_object_unref, or %NULL.
*/
GckObject *
diff --git a/gck/gck-module.c b/gck/gck-module.c
index f50200b..9e381b1 100644
--- a/gck/gck-module.c
+++ b/gck/gck-module.c
@@ -376,7 +376,7 @@ free_initialize (Initialize *args)
/**
* gck_module_initialize:
* @path: The file system path to the PKCS\#11 module to load.
- * @cancellable: (allow-none): optional cancellation object
+ * @cancellable: (nullable): optional cancellation object
* @error: A location to store an error resulting from a failed load.
*
* Load and initialize a PKCS\#11 module represented by a GckModule object.
@@ -413,7 +413,7 @@ gck_module_initialize (const gchar *path,
/**
* gck_module_initialize_async:
* @path: the file system path to the PKCS\#11 module to load
- * @cancellable: (allow-none): optional cancellation object
+ * @cancellable: (nullable): optional cancellation object
* @callback: a callback which will be called when the operation completes
* @user_data: data to pass to the callback
*
@@ -444,7 +444,7 @@ gck_module_initialize_async (const gchar *path,
*
* Finishes the asynchronous initialize operation.
*
- * Returns: (transfer full) (allow-none): The initialized module, or NULL
+ * Returns: (transfer full) (nullable): The initialized module, or NULL
*/
GckModule *
gck_module_initialize_finish (GAsyncResult *result,
diff --git a/gck/gck-modules.c b/gck/gck-modules.c
index 57530ab..766da57 100644
--- a/gck/gck-modules.c
+++ b/gck/gck-modules.c
@@ -82,8 +82,8 @@ free_initialize_registered (InitializeRegistered *args)
/**
* gck_modules_initialize_registered:
- * @cancellable: (allow-none): optional cancellation object
- * @error: (allow-none): location to place an error on failure
+ * @cancellable: (nullable): optional cancellation object
+ * @error: (out) (optional): location to place an error on failure
*
* Load and initialize all the registered modules.
*
@@ -333,7 +333,7 @@ gck_modules_tokens_for_uri (GList *modules,
* This call can block. Use gck_modules_enumerate_uri() for a non-blocking
* version.
*
- * Returns: (transfer full) (allow-none): A new #GckObject which should be released with
+ * Returns: (transfer full) (nullable): A new #GckObject which should be released with
* g_object_unref(), or %NULL if no matching object was found.
*/
GckObject*
diff --git a/gck/gck-object-cache.c b/gck/gck-object-cache.c
index 8da15cb..e6f93e7 100644
--- a/gck/gck-object-cache.c
+++ b/gck/gck-object-cache.c
@@ -88,7 +88,7 @@ gck_object_cache_default_init (GckObjectCacheIface *iface)
*
* Gets the attributes cached on this object.
*
- * Returns: (transfer full) (allow-none): the attributes
+ * Returns: (transfer full) (nullable): the attributes
*/
GckAttributes *
gck_object_cache_get_attributes (GckObjectCache *object)
@@ -102,7 +102,7 @@ gck_object_cache_get_attributes (GckObjectCache *object)
/**
* gck_object_cache_set_attributes:
* @object: an object with an attribute cache
- * @attrs: (allow-none): the attributes to set
+ * @attrs: (nullable): the attributes to set
*
* Sets the attributes cached on this object.
*
diff --git a/gck/gck-session.c b/gck/gck-session.c
index 433498c..a55dfaf 100644
--- a/gck/gck-session.c
+++ b/gck/gck-session.c
@@ -769,7 +769,7 @@ gck_session_get_options (GckSession *self)
* Get the interaction object set on this session, which is used to prompt
* for pins and the like.
*
- * Returns: (transfer full) (allow-none): the interaction object, or %NULL
+ * Returns: (transfer full) (nullable): the interaction object, or %NULL
*/
GTlsInteraction *
gck_session_get_interaction (GckSession *self)
@@ -785,7 +785,7 @@ gck_session_get_interaction (GckSession *self)
/**
* gck_session_set_interaction:
* @self: the session
- * @interaction: (allow-none): the interaction or %NULL
+ * @interaction: (nullable): the interaction or %NULL
*
* Set the interaction object on this session, which is used to prompt for
* pins and the like.
@@ -816,7 +816,7 @@ gck_session_set_interaction (GckSession *self,
* gck_session_open:
* @slot: the slot to open session on
* @options: session options
- * @interaction: (allow-none): optional interaction for logins or object authentication
+ * @interaction: (nullable): optional interaction for logins or object authentication
* @cancellable: optional cancellation object
* @error: location to place error or %NULL
*
@@ -842,7 +842,7 @@ gck_session_open (GckSlot *slot,
* gck_session_open_async:
* @slot: the slot to open session on
* @options: session options
- * @interaction: (allow-none): optional interaction for logins or object authentication
+ * @interaction: (nullable): optional interaction for logins or object authentication
* @cancellable: optional cancellation object
* @callback: called when the operation completes
* @user_data: data to pass to callback
@@ -917,7 +917,7 @@ perform_init_pin (InitPin *args)
/**
* gck_session_init_pin:
* @self: Initialize PIN for this session's slot.
- * @pin: (allow-none) (array length=n_pin): the user's PIN, or %NULL for
+ * @pin: (nullable) (array length=n_pin): the user's PIN, or %NULL for
* protected authentication path
* @n_pin: the length of the PIN
* @cancellable: Optional cancellation object, or NULL.
@@ -943,7 +943,7 @@ gck_session_init_pin (GckSession *self, const guchar *pin, gsize n_pin,
/**
* gck_session_init_pin_async:
* @self: Initialize PIN for this session's slot.
- * @pin: (allow-none) (array length=n_pin): the user's PIN, or %NULL for protected authentication path
+ * @pin: (nullable) (array length=n_pin): the user's PIN, or %NULL for protected authentication path
* @n_pin: the length of the PIN
* @cancellable: Optional cancellation object, or NULL.
* @callback: Called when the operation completes.
@@ -1015,10 +1015,10 @@ perform_set_pin (SetPin *args)
/**
* gck_session_set_pin:
* @self: Change the PIN for this session's slot.
- * @old_pin: (allow-none) (array length=n_old_pin): the user's old PIN, or %NULL
+ * @old_pin: (nullable) (array length=n_old_pin): the user's old PIN, or %NULL
* for protected authentication path.
* @n_old_pin: The length of the PIN.
- * @new_pin: (allow-none) (array length=n_new_pin): the user's new PIN, or %NULL
+ * @new_pin: (nullable) (array length=n_new_pin): the user's new PIN, or %NULL
* for protected authentication path
* @n_new_pin: The length of the PIN.
* @cancellable: Optional cancellation object, or NULL.
@@ -1042,10 +1042,10 @@ gck_session_set_pin (GckSession *self, const guchar *old_pin, gsize n_old_pin,
/**
* gck_session_set_pin_async:
* @self: Change the PIN for this session's slot.
- * @old_pin: (allow-none) (array length=n_new_pin): the user's old PIN, or %NULL
+ * @old_pin: (nullable) (array length=n_new_pin): the user's old PIN, or %NULL
* for protected authentication path
* @n_old_pin: the length of the old PIN
- * @new_pin: (allow-none) (array length=n_new_pin): the user's new PIN, or %NULL
+ * @new_pin: (nullable) (array length=n_new_pin): the user's new PIN, or %NULL
* for protected authentication path
* @n_new_pin: the length of the new PIN
* @cancellable: Optional cancellation object, or NULL.
@@ -1117,7 +1117,7 @@ perform_login (Login *args)
* gck_session_login:
* @self: Log in to this session.
* @user_type: The type of login user.
- * @pin: (allow-none) (array length=n_pin): the user's PIN, or %NULL for
+ * @pin: (nullable) (array length=n_pin): the user's PIN, or %NULL for
* protected authentication path
* @n_pin: The length of the PIN.
* @cancellable: Optional cancellation object, or NULL.
@@ -1141,7 +1141,7 @@ gck_session_login (GckSession *self, gulong user_type, const guchar *pin,
* gck_session_login_async:
* @self: Log in to this session.
* @user_type: The type of login user.
- * @pin: (allow-none) (array length=n_pin): the user's PIN, or %NULL for
+ * @pin: (nullable) (array length=n_pin): the user's PIN, or %NULL for
* protected authentication path
* @n_pin: The length of the PIN.
* @cancellable: Optional cancellation object, or NULL.
@@ -1208,7 +1208,7 @@ perform_interactive (Interactive *args)
* gck_session_login_interactive:
* @self: session to use for login
* @user_type: the type of login user
- * @interaction: (allow-none): interaction to request PIN when necessary
+ * @interaction: (nullable): interaction to request PIN when necessary
* @cancellable: optional cancellation object, or %NULL
* @error: location to return an error
*
@@ -1243,7 +1243,7 @@ gck_session_login_interactive (GckSession *self,
* gck_session_login_interactive_async:
* @self: session to use for login
* @user_type: the type of login user
- * @interaction: (allow-none): interaction to request PIN when necessary
+ * @interaction: (nullable): interaction to request PIN when necessary
* @cancellable: optional cancellation object, or %NULL
* @callback: called when the operation completes
* @user_data: data to pass to the callback
@@ -1573,7 +1573,7 @@ perform_find_objects (FindObjects *args)
*
* If the @match #GckAttributes is floating, it is consumed.
*
- * Returns: (transfer full) (array length=n_handles) (allow-none): a list of
+ * Returns: (transfer full) (array length=n_handles) (nullable): a list of
* the matching objects, which may be empty
**/
gulong *
@@ -1645,7 +1645,7 @@ gck_session_find_handles_async (GckSession *self,
*
* Get the result of a find handles operation.
*
- * Returns: (transfer full) (array length=n_handles) (allow-none): an array of
+ * Returns: (transfer full) (array length=n_handles) (nullable): an array of
* handles that matched, which may be empty, or %NULL on failure
**/
gulong *
@@ -1843,8 +1843,8 @@ perform_generate_key_pair (GenerateKeyPair *args)
* @mech_type: The mechanism type to use for key generation.
* @public_attrs: Additional attributes for the generated public key.
* @private_attrs: Additional attributes for the generated private key.
- * @public_key: (allow-none) (out): location to return the resulting public key
- * @private_key: (allow-none) (out): location to return the resulting private key.
+ * @public_key: (optional) (out): location to return the resulting public key
+ * @private_key: (optional) (out): location to return the resulting private key.
* @cancellable: Optional cancellation object, or NULL.
* @error: A location to return an error, or NULL.
*
@@ -1872,8 +1872,8 @@ gck_session_generate_key_pair (GckSession *self, gulong mech_type,
* @mechanism: The mechanism to use for key generation.
* @public_attrs: Additional attributes for the generated public key.
* @private_attrs: Additional attributes for the generated private key.
- * @public_key: (allow-none) (out): a location to return the resulting public key
- * @private_key: (allow-none) (out): a location to return the resulting private key
+ * @public_key: (optional) (out): a location to return the resulting public key
+ * @private_key: (optional) (out): a location to return the resulting private key
* @cancellable: Optional cancellation object, or NULL.
* @error: A location to return an error, or NULL.
*
@@ -1967,8 +1967,8 @@ gck_session_generate_key_pair_async (GckSession *self, GckMechanism *mechanism,
* gck_session_generate_key_pair_finish:
* @self: The session to use.
* @result: The async result passed to the callback.
- * @public_key: (allow-none) (out): a location to return the resulting public key
- * @private_key: (allow-none) (out): a location to return the resulting private key
+ * @public_key: (optional) (out): a location to return the resulting public key
+ * @private_key: (optional) (out): a location to return the resulting private key
* @error: A location to return an error.
*
* Get the result of a generate key pair operation.