Summary: | [PATCH] Clean up closure handling in the example domain. | ||
---|---|---|---|
Product: | realmd | Reporter: | Marius Vollmer <marius.vollmer> |
Component: | General | Assignee: | Stef Walter <stefw> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | stefw |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | 62214 | ||
Bug Blocks: | |||
Attachments: |
Clean up closure handling in the example domain.
Clean up closure handling in the example domain |
Description
Marius Vollmer
2013-03-12 09:36:39 UTC
Comment on attachment 76379 [details] [review] Clean up closure handling in the example domain. Review of attachment 76379 [details] [review]: ----------------------------------------------------------------- I agree. This is better. But just one more thing. ::: service/realm-example.c @@ +142,5 @@ > GAsyncResult *res, > gpointer user_data) > { > + GSimpleAsyncResult *async = G_SIMPLE_ASYNC_RESULT (user_data); > + RealmExample *self = REALM_EXAMPLE (g_simple_async_result_get_op_res_gpointer (async)); You can use g_async_result_get_source_object() here. Keep in mind that it returns a reffed return value (ie: transfer full). @@ +198,4 @@ > g_simple_async_result_complete_in_idle (async); > > } else { > + g_simple_async_result_set_op_res_gpointer (async, g_object_ref (self), g_object_unref); Together with the above comment, I don't think this line is necessary. @@ +212,5 @@ > GAsyncResult *res, > gpointer user_data) > { > + GSimpleAsyncResult *async = G_SIMPLE_ASYNC_RESULT (user_data); > + RealmExample *self = REALM_EXAMPLE (g_simple_async_result_get_op_res_gpointer (async)); Ditto. @@ +283,4 @@ > g_simple_async_result_complete_in_idle (async); > > } else { > + g_simple_async_result_set_op_res_gpointer (async, g_object_ref (self), g_object_unref); And ditto. @@ +316,4 @@ > g_simple_async_result_complete_in_idle (async); > > } else { > + g_simple_async_result_set_op_res_gpointer (async, g_object_ref (self), g_object_unref); Again. (In reply to comment #1) > Comment on attachment 76379 [details] [review] [review] > Clean up closure handling in the example domain. > > Review of attachment 76379 [details] [review] [review]: > ----------------------------------------------------------------- > > I agree. This is better. But just one more thing. Ok, thanks! Created attachment 77990 [details] [review] Clean up closure handling in the example domain |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.