[evolution-data-server/wip/camel-more-gobject] Fix the CamelServiceAuthType clone/free methods
- From: Corentin Noël <corentinnoel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/wip/camel-more-gobject] Fix the CamelServiceAuthType clone/free methods
- Date: Mon, 31 Oct 2016 20:13:34 +0000 (UTC)
commit 243e9a2f978929ca13b4d40c6868f3e3b7aa9850
Author: Corentin Noël <corentin elementary io>
Date: Mon Oct 31 21:12:23 2016 +0100
Fix the CamelServiceAuthType clone/free methods
It's useless for Evolution Data Server but required for the introspection.
src/camel/camel-service.c | 24 +++++++++---------------
1 files changed, 9 insertions(+), 15 deletions(-)
---
diff --git a/src/camel/camel-service.c b/src/camel/camel-service.c
index d996f54..bbc4e99 100644
--- a/src/camel/camel-service.c
+++ b/src/camel/camel-service.c
@@ -2383,18 +2383,14 @@ camel_service_query_auth_types_finish (CamelService *service,
* camel_service_auth_type_free:
* @service_auth_type: an #CamelServiceAuthType
*
- * Frees the @service_auth_type struct and its contents.
+ * Frees the @service_auth_type struct.
+ * Does nothing in reality, needed for the introspection.
**/
void
camel_service_auth_type_free (CamelServiceAuthType *service_auth_type)
{
- if (!service_auth_type)
- return;
-
- g_free (service_auth_type->name);
- g_free (service_auth_type->description);
- g_free (service_auth_type->authproto);
- g_free (service_auth_type);
+ // This is needed for the introspection.
+ // In the reality, each CamelSasl subclass has a static reference of it.
}
/**
@@ -2402,16 +2398,14 @@ camel_service_auth_type_free (CamelServiceAuthType *service_auth_type)
* @service_auth_type: an #CamelServiceAuthType
*
* Copies the @service_auth_type struct.
+ * Does nothing and returns the given object in reality, needed for the introspection.
+ *
* Returns: (transfer full): the copy of @service_auth_type
**/
CamelServiceAuthType *
camel_service_auth_type_copy (const CamelServiceAuthType* service_auth_type)
{
- CamelServiceAuthType *new_service_auth_type = g_new0 (CamelServiceAuthType, 1);
- new_service_auth_type->name = g_strdup (service_auth_type->name);
- new_service_auth_type->description = g_strdup (service_auth_type->description);
- new_service_auth_type->authproto = g_strdup (service_auth_type->authproto);
- new_service_auth_type->need_password = service_auth_type->need_password;
-
- return new_service_auth_type;
+ // This is needed for the introspection.
+ // In the reality, each CamelSasl subclass has a static reference of it.
+ return service_auth_type;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]