summaryrefslogtreecommitdiff
path: root/gi/pygi-struct.c
diff options
context:
space:
mode:
authorSimon Feltman <sfeltman@src.gnome.org>2014-01-01 19:57:06 -0800
committerSimon Feltman <sfeltman@src.gnome.org>2014-01-01 19:57:06 -0800
commite8359847136e9ad76a670a382c0abc61cb4e81d3 (patch)
treeae514accfc7450852c3b2ab81e336ddc9fde4598 /gi/pygi-struct.c
parent9ce527b09ed032f2cc83c2d83de8bb6d7b19be02 (diff)
downloadpygobject-e8359847136e9ad76a670a382c0abc61cb4e81d3.tar.gz
Cleanup disguised struct constructor error and add it to boxed
Give a cleaner error message when an attempt is made to create a disguised struct which also gives a hint to look at the pydoc. Add similar error to disguised boxed/unions. https://bugzilla.gnome.org/show_bug.cgi?id=647249
Diffstat (limited to 'gi/pygi-struct.c')
-rw-r--r--gi/pygi-struct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gi/pygi-struct.c b/gi/pygi-struct.c
index 29ea38e8..38f6a8ae 100644
--- a/gi/pygi-struct.c
+++ b/gi/pygi-struct.c
@@ -72,7 +72,7 @@ _struct_new (PyTypeObject *type,
size = g_struct_info_get_size ( (GIStructInfo *) info);
if (size == 0) {
PyErr_Format (PyExc_TypeError,
- "cannot allocate disguised struct %s.%s; consider adding a constructor to the library or to the overrides",
+ "struct cannot be created directly; try using a constructor, see: help(%s.%s)",
g_base_info_get_namespace (info),
g_base_info_get_name (info));
goto out;