summaryrefslogtreecommitdiff
path: root/gi/pygi-boxed.c
diff options
context:
space:
mode:
authorSimon Feltman <sfeltman@src.gnome.org>2013-02-10 13:40:45 -0800
committerSimon Feltman <sfeltman@src.gnome.org>2013-02-10 13:40:45 -0800
commitaff2ea1b681c3019f7dbdc841c2e33de78dbb88f (patch)
tree0ca051b03a2212ff96555ed8043ee63e4f8fe6c0 /gi/pygi-boxed.c
parent5efe2e5c8458d9f4d72329ea1209d96b5ebecfb4 (diff)
downloadpygobject-aff2ea1b681c3019f7dbdc841c2e33de78dbb88f.tar.gz
Remove workaround for g_struct_info_get_size reporting incorrect size
Remove workaround for g_struct_info_get_size reporting incorrect size for boxed GValues. Verified this now returns the correct size of 24. https://bugzilla.gnome.org/show_bug.cgi?id=622711
Diffstat (limited to 'gi/pygi-boxed.c')
-rw-r--r--gi/pygi-boxed.c31
1 files changed, 13 insertions, 18 deletions
diff --git a/gi/pygi-boxed.c b/gi/pygi-boxed.c
index ff3db9b1..c15c927a 100644
--- a/gi/pygi-boxed.c
+++ b/gi/pygi-boxed.c
@@ -53,24 +53,19 @@ _pygi_boxed_alloc (GIBaseInfo *info, gsize *size_out)
{
gsize size;
- /* FIXME: Remove when bgo#622711 is fixed */
- if (g_registered_type_info_get_g_type (info) == G_TYPE_VALUE) {
- size = sizeof (GValue);
- } else {
- switch (g_base_info_get_type (info)) {
- case GI_INFO_TYPE_UNION:
- size = g_union_info_get_size ( (GIUnionInfo *) info);
- break;
- case GI_INFO_TYPE_BOXED:
- case GI_INFO_TYPE_STRUCT:
- size = g_struct_info_get_size ( (GIStructInfo *) info);
- break;
- default:
- PyErr_Format (PyExc_TypeError,
- "info should be Boxed or Union, not '%d'",
- g_base_info_get_type (info));
- return NULL;
- }
+ switch (g_base_info_get_type (info)) {
+ case GI_INFO_TYPE_UNION:
+ size = g_union_info_get_size ( (GIUnionInfo *) info);
+ break;
+ case GI_INFO_TYPE_BOXED:
+ case GI_INFO_TYPE_STRUCT:
+ size = g_struct_info_get_size ( (GIStructInfo *) info);
+ break;
+ default:
+ PyErr_Format (PyExc_TypeError,
+ "info should be Boxed or Union, not '%d'",
+ g_base_info_get_type (info));
+ return NULL;
}
if( size_out != NULL)