seed r769 - trunk/libseed
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r769 - trunk/libseed
- Date: Mon, 19 Jan 2009 16:35:44 +0000 (UTC)
Author: racarr
Date: Mon Jan 19 16:35:44 2009
New Revision: 769
URL: http://svn.gnome.org/viewvc/seed?rev=769&view=rev
Log:
Refactor some array code
Modified:
trunk/libseed/seed-types.c
Modified: trunk/libseed/seed-types.c
==============================================================================
--- trunk/libseed/seed-types.c (original)
+++ trunk/libseed/seed-types.c Mon Jan 19 16:35:44 2009
@@ -117,19 +117,22 @@
GITypeInfo *param_type;
param_type = g_type_info_get_param_type(type_info, 0);
-
- if (g_type_info_get_tag(param_type) == GI_TYPE_TAG_UTF8)
+
+ switch (g_type_info_get_tag(param_type))
{
+ case GI_TYPE_TAG_UTF8:
if (transfer == GI_TRANSFER_EVERYTHING)
g_strfreev(arg->v_pointer);
else if (transfer == GI_TRANSFER_CONTAINER)
g_free(arg->v_pointer);
- }
- else if (g_type_info_get_tag(param_type) == GI_TYPE_TAG_GTYPE ||
- g_type_info_get_tag(param_type) == GI_TYPE_TAG_FLOAT)
+ break;
+ case GI_TYPE_TAG_GTYPE:
+ case GI_TYPE_TAG_FLOAT:
g_free(arg->v_pointer);
- else
+ break;
+ default:
g_assert_not_reached();
+ }
g_base_info_unref((GIBaseInfo *) param_type);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]