GNOME Bugzilla – Bug 617978
Improve validation for parameter references
Last modified: 2015-02-07 17:00:07 UTC
Here's some patches that fix problems I had with the scanner accepting bad input when I was trying to add some (destroy) and (closure) annotations.
Created attachment 160475 [details] [review] Use -1 not None for closure/destroy indices Don't assign None to closure and destroy indices in case of collision, they are supposed to be numeric.
Created attachment 160476 [details] [review] Validate scope annotation values Make sure that the value specified for scope in a callback annotation is one of the legal values.
Created attachment 160477 [details] [review] Validate parameter references When an annotation references another parameter, check that that parameter actually exists. Add a comment to the handling of (closure) for callbacks to explain why we don't need the same handling there despite the use of get_parameter_index().
Review of attachment 160475 [details] [review]: Looks good.
Review of attachment 160476 [details] [review]: Looks great, thanks!
Review of attachment 160477 [details] [review]: Looks good as well
Attachment 160475 [details] pushed as 2f7066d - Use -1 not None for closure/destroy indices Attachment 160476 [details] pushed as a78f828 - Validate scope annotation values Attachment 160477 [details] pushed as 36c1996 - Validate parameter references
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]