After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 667701 - ast.py List clone fails
ast.py List clone fails
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-01-11 15:46 UTC by jessevdk@gmail.com
Modified: 2015-02-07 17:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The patch (721 bytes, patch)
2012-01-11 15:47 UTC, jessevdk@gmail.com
reviewed Details | Review
Remove array fields from List.clone (868 bytes, patch)
2012-03-15 15:19 UTC, jessevdk@gmail.com
committed Details | Review

Description jessevdk@gmail.com 2012-01-11 15:46:21 UTC
It seems that clone of List (giscanner/ast.py, http://git.gnome.org/browse/gobject-introspection/tree/giscanner/ast.py#n657) was copied from the clone of Array and contains invalid fields (zero-terminated, size and length_param_name). This results in:

AttributeError: 'List' object has no attribute 'zeroterminated'
Comment 1 jessevdk@gmail.com 2012-01-11 15:47:30 UTC
Created attachment 205023 [details] [review]
The patch
Comment 2 Colin Walters 2012-01-11 20:49:46 UTC
Review of attachment 205023 [details] [review]:

Looks correct...but what triggered this?  How did you encounter the error?  This kind of stuff is useful for people later; can you add something to the commit message?

Also you could now change the code to read:

return List(self.name, self.element_type)
Comment 3 jessevdk@gmail.com 2012-01-12 09:18:13 UTC
I don't really know when it hits this code path exactly. I get the exception when doing a scan of a (fairly extensive) library that I wrote.
Comment 4 jessevdk@gmail.com 2012-03-15 15:19:34 UTC
Created attachment 209846 [details] [review]
Remove array fields from List.clone
Comment 5 jessevdk@gmail.com 2012-03-15 15:20:13 UTC
Updated patch, can this please be committed?
Comment 6 Colin Walters 2012-03-15 15:24:37 UTC
I tweaked the commit message slightly.  Thanks for the patch!
Comment 7 André Klapper 2015-02-07 17:02:14 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]