GNOME Bugzilla – Bug 639972
raise a better exception when we aren't able to allocate a struct
Last modified: 2012-09-03 16:00:28 UTC
If a struct is opaque and g-i reports a size of 0 _and_ there isn't a suitable default constructor, a MemoryError is raised because we try to allocate a buffer of 0 bytes. Instead, we should give a better error that instructed people to add an override or fix it in the C level.
Fixed with a test case: http://git.gnome.org/browse/pygobject/commit/?id=77844c571ad0bad