GNOME Bugzilla – Bug 569633
[PATCH] Typelib compiler fails with vararg callbacks.
Last modified: 2015-02-07 16:54:46 UTC
Please describe the problem: The typelib compiler fails with NULL node when there is a vararg callback or a function expecting a vararg callback. Attached is a patch to fix this by filtering them out as happens with other vararg functions. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 127434 [details] [review] Patch to fix problem
Thanks for the patch. Looks pretty good, however you need to run make check and update the tests (foo-1.0-expected.gir and foo-1.0-expected.tgir) as well. I'd personally use a for(x=...;x;x=x->next) instead of that while, as you're iterating over a list. The function body is rather large as well, I'd also refactor it into at least one more function
Created attachment 128144 [details] [review] Updated patch I think this patch addresses your concerns. I didn't convert the iteration to a for loop, as due to where the iter->next and checking occurs, the most natural form for the loop expression, is not actually identical to the while loop (due to list deleting) (I know, it sounds strange, but is easily testable).
Minor inconsistent spacing: + g_list_free(varargs_callbacks); But other than that looks great!
Forgot about the no gnome account yet. Applied, thanks!
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]