[Bug 30430] Make wocky_implement_finish_* macros safer

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Sep 29 00:51:37 CEST 2010


https://bugs.freedesktop.org/show_bug.cgi?id=30430

--- Comment #6 from Nicolas Dufresne <nicolas.dufresne at collabora.co.uk> 2010-09-28 15:51:36 PDT ---
(In reply to comment #5)
> (In reply to comment #4)
> > I'd prefer to keep all the stuff dealing with source_object together, *then* do
> > all the stuff dealing with cancellable (in other words, move the indicated line
> > before the "if").
> 
> Ok, will do.

Done:
http://git.collabora.co.uk/?p=user/nicolas/wocky.git;a=commitdiff;h=9afeba07b3faef08d3a4341c157da28474c835c3

> 
> > This does change the semantics for the case where cancellable is NULL: if
> > output_cancellable isn't already NULL, it's not overwritten. This seems to be
> > checked for already, but it might be worth asserting.
> 
> Concurrent async calls are generally not allowed in Wocky, so yes we should
> generally assert for cancellable and result to be NULL (we usually assert/error
> for only one of them). I can give a pass for that, to make sure we are
> consistent.

Done:
http://git.collabora.co.uk/?p=user/nicolas/wocky.git;a=commitdiff;h=1f30157337330787d7a2da95e07df5cec7934524

> > 
> > > +  GSimpleAsyncResult *__simple; \
> > 
> > You didn't mention in the commit message that you switched to
> > double-underscored variable names. All double-underscored names are reserved
> > for use by the compiler/C library, so this is wrong. Use a single underscore if
> > you want to avoid collisions with library-user-defined variable names (but to
> > be honest, these macros are the entire body of a function, so I don't really
> > see what they'd be colliding with).
> 
> Aren't Wocky a library ? Honestly I just forgot about this change (was going to
> revert it at some point). This change was done while trying to mimic GLib macro
> style, which consistently use double __ inside macros. I can move to single _.
> I'll move __p to.

Done:
http://git.collabora.co.uk/?p=user/nicolas/wocky.git;a=commitdiff;h=195f8353ac7a9f15956ca14bea493fa1976e87cb
(will be sqashed when this review is done)

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the telepathy-bugs mailing list