util.h | util.h | |||
---|---|---|---|---|
skipping to change at line 112 | skipping to change at line 112 | |||
TpWeakRef *tp_weak_ref_new (gpointer object, | TpWeakRef *tp_weak_ref_new (gpointer object, | |||
gpointer user_data, | gpointer user_data, | |||
GDestroyNotify destroy) G_GNUC_WARN_UNUSED_RESULT; | GDestroyNotify destroy) G_GNUC_WARN_UNUSED_RESULT; | |||
gpointer tp_weak_ref_get_user_data (TpWeakRef *self) G_GNUC_WARN_UNUSED_RES ULT; | gpointer tp_weak_ref_get_user_data (TpWeakRef *self) G_GNUC_WARN_UNUSED_RES ULT; | |||
gpointer tp_weak_ref_dup_object (TpWeakRef *self) G_GNUC_WARN_UNUSED_RESULT ; | gpointer tp_weak_ref_dup_object (TpWeakRef *self) G_GNUC_WARN_UNUSED_RESULT ; | |||
void tp_weak_ref_destroy (TpWeakRef *self); | void tp_weak_ref_destroy (TpWeakRef *self); | |||
#define tp_clear_pointer(pp, destroy) \ | #define tp_clear_pointer(pp, destroy) \ | |||
G_STMT_START \ | G_STMT_START \ | |||
{ \ | { \ | |||
if (pp != NULL) \ | gpointer _tp_clear_pointer_tmp; \ | |||
{ \ | \ | |||
gpointer _tp_clear_pointer_tmp = *(pp); \ | _tp_clear_pointer_tmp = *(pp); \ | |||
\ | *(pp) = NULL; \ | |||
*(pp) = NULL; \ | \ | |||
\ | if (_tp_clear_pointer_tmp != NULL) \ | |||
if (_tp_clear_pointer_tmp != NULL) \ | (destroy) (_tp_clear_pointer_tmp); \ | |||
(destroy) (_tp_clear_pointer_tmp); \ | ||||
} \ | ||||
} \ | } \ | |||
G_STMT_END | G_STMT_END | |||
#define tp_clear_object(op) tp_clear_pointer ((op), g_object_unref) | #define tp_clear_object(op) tp_clear_pointer ((op), g_object_unref) | |||
#define tp_clear_boxed(gtype, pp) \ | #define tp_clear_boxed(gtype, pp) \ | |||
G_STMT_START \ | G_STMT_START \ | |||
{ \ | { \ | |||
if (pp != NULL) \ | gpointer _tp_clear_boxed_tmp; \ | |||
{ \ | \ | |||
gpointer _tp_clear_boxed_tmp = *(pp); \ | _tp_clear_boxed_tmp = *(pp); \ | |||
\ | *(pp) = NULL; \ | |||
*(pp) = NULL; \ | \ | |||
\ | if (_tp_clear_boxed_tmp != NULL) \ | |||
if (_tp_clear_boxed_tmp != NULL) \ | g_boxed_free (gtype, _tp_clear_boxed_tmp); \ | |||
g_boxed_free (gtype, _tp_clear_boxed_tmp); \ | ||||
} \ | ||||
} \ | } \ | |||
G_STMT_END | G_STMT_END | |||
void tp_simple_async_report_success_in_idle (GObject *source, | void tp_simple_async_report_success_in_idle (GObject *source, | |||
GAsyncReadyCallback callback, gpointer user_data, gpointer source_tag); | GAsyncReadyCallback callback, gpointer user_data, gpointer source_tag); | |||
gint64 tp_user_action_time_from_x11 (guint32 x11_time); | gint64 tp_user_action_time_from_x11 (guint32 x11_time); | |||
gboolean tp_user_action_time_should_present (gint64 user_action_time, | gboolean tp_user_action_time_should_present (gint64 user_action_time, | |||
guint32 *x11_time); | guint32 *x11_time); | |||
End of changes. 2 change blocks. | ||||
18 lines changed or deleted | 14 lines changed or added | |||