diff options
Diffstat (limited to 'gi/gimodule.c')
-rw-r--r-- | gi/gimodule.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gi/gimodule.c b/gi/gimodule.c index 2c4c335..5ef166f 100644 --- a/gi/gimodule.c +++ b/gi/gimodule.c @@ -475,8 +475,10 @@ _wrap_pyg_variant_type_from_string (PyObject *self, PyObject *args) py_type = _pygi_type_import_by_name ("GLib", "VariantType"); - py_variant = _pygi_struct_new ( (PyTypeObject *) py_type, type_string, FALSE); - + if (PyType_IsSubtype (py_type, &PyGIBoxed_Type)) + py_variant = _pygi_boxed_new ( (PyTypeObject *) py_type, type_string, FALSE); + else + py_variant = _pygi_struct_new ( (PyTypeObject *) py_type, type_string, FALSE); return py_variant; } |