diff options
author | Stef Walter <stefw@collabora.co.uk> | 2011-09-28 14:24:43 +0200 |
---|---|---|
committer | Stef Walter <stefw@collabora.co.uk> | 2011-09-28 14:28:38 +0200 |
commit | 34fd5215bdc064247409acc4e1fce892450b8e51 (patch) | |
tree | 00a6fcbac8f0b1a3bfa44b0759d945905f7f5ab7 /gck/gck-attributes.c | |
parent | 007e09a075927b6ab5095ea60278ed1cd91c8397 (diff) | |
download | gcr-34fd5215bdc064247409acc4e1fce892450b8e51.tar.gz |
gck: Fix introspection warnings and complete introspection annotations
https://bugzilla.gnome.org/show_bug.cgi?id=655651
Diffstat (limited to 'gck/gck-attributes.c')
-rw-r--r-- | gck/gck-attributes.c | 51 |
1 files changed, 34 insertions, 17 deletions
diff --git a/gck/gck-attributes.c b/gck/gck-attributes.c index 8adb05c..777d816 100644 --- a/gck/gck-attributes.c +++ b/gck/gck-attributes.c @@ -74,7 +74,7 @@ attribute_init (GckAttribute *attr, gulong attr_type, } /** - * gck_attribute_init: + * gck_attribute_init: (skip): * @attr: An uninitialized attribute. * @attr_type: The PKCS\#11 attribute type to set on the attribute. * @value: The raw value of the attribute. @@ -95,7 +95,7 @@ gck_attribute_init (GckAttribute *attr, gulong attr_type, } /** - * gck_attribute_init_invalid: + * gck_attribute_init_invalid: (skip): * @attr: An uninitialized attribute. * @attr_type: The PKCS\#11 attribute type to set on the attribute. * @@ -117,7 +117,7 @@ gck_attribute_init_invalid (GckAttribute *attr, gulong attr_type) } /** - * gck_attribute_init_empty: + * gck_attribute_init_empty: (skip): * @attr: An uninitialized attribute. * @attr_type: The PKCS\#11 attribute type to set on the attribute. * @@ -147,7 +147,7 @@ attribute_init_boolean (GckAttribute *attr, gulong attr_type, } /** - * gck_attribute_init_boolean: + * gck_attribute_init_boolean: (skip): * @attr: An uninitialized attribute. * @attr_type: The PKCS\#11 attribute type to set on the attribute. * @value: The boolean value of the attribute. @@ -184,7 +184,7 @@ attribute_init_date (GckAttribute *attr, gulong attr_type, } /** - * gck_attribute_init_date: + * gck_attribute_init_date: (skip): * @attr: An uninitialized attribute. * @attr_type: The PKCS\#11 attribute type to set on the attribute. * @value: The date value of the attribute. @@ -213,7 +213,7 @@ attribute_init_ulong (GckAttribute *attr, gulong attr_type, } /** - * gck_attribute_init_ulong: + * gck_attribute_init_ulong: (skip): * @attr: An uninitialized attribute. * @attr_type: The PKCS\#11 attribute type to set on the attribute. * @value: The ulong value of the attribute. @@ -241,7 +241,7 @@ attribute_init_string (GckAttribute *attr, gulong attr_type, } /** - * gck_attribute_init_string: + * gck_attribute_init_string: (skip): * @attr: An uninitialized attribute. * @attr_type: The PKCS\#11 attribute type to set on the attribute. * @value: The null terminated string value of the attribute. @@ -262,6 +262,20 @@ gck_attribute_init_string (GckAttribute *attr, gulong attr_type, attribute_init_string (attr, attr_type, value, g_realloc); } +GType +gck_attribute_get_type (void) +{ + static volatile gsize initialized = 0; + static GType type = 0; + if (g_once_init_enter (&initialized)) { + type = g_boxed_type_register_static ("GckAttribute", + (GBoxedCopyFunc)gck_attribute_dup, + (GBoxedFreeFunc)gck_attribute_free); + g_once_init_leave (&initialized, 1); + } + return type; +} + /** * gck_attribute_new: * @attr_type: The PKCS\#11 attribute type to set on the attribute. @@ -743,24 +757,27 @@ struct _GckAttributes { * Returns: The allocated memory, or NULL when freeing. **/ -/** - * gck_attributes_get_boxed_type: - * - * Get the boxed type representing a GckAttributes array. - * - * Return value: The boxed type. - **/ GType -gck_attributes_get_boxed_type (void) +gck_attributes_get_type (void) { + static volatile gsize initialized = 0; static GType type = 0; - if (!type) + if (g_once_init_enter (&initialized)) { type = g_boxed_type_register_static ("GckAttributes", (GBoxedCopyFunc)gck_attributes_ref, (GBoxedFreeFunc)gck_attributes_unref); + g_once_init_leave (&initialized, 1); + } return type; } +GType +gck_attributes_get_boxed_type (void) +{ + /* Deprecated version */ + return gck_attributes_get_type (); +} + /** * gck_attributes_new: * @@ -776,7 +793,7 @@ gck_attributes_new (void) } /** - * gck_attributes_new_full: + * gck_attributes_new_full: (skip): * @allocator: Memory allocator for attribute data, or NULL for default. * * Create a new GckAttributes array. |