/* Sets the callback function storing the data as a refcounted callback "object". This is used internally. Note that calling g_source_set_callback_indirect() assumes an initial reference count on @callback_data, and thus @callback_funcs->unref will eventually be called once more than @callback_funcs->ref.  */
void g_source_set_callback_indirect(GSource *source, gpointer callback_data, GSourceCallbackFuncs *callback_funcs)
/* Sets the callback function storing the data as a refcounted callback "object". This is used internally. Note that calling g_source_set_callback_indirect() assumes an initial reference count on @callback_data, and thus @callback_funcs->unref will eventually be called once more than @callback_funcs->ref.  */
void g_source_set_callback_indirect(GSource *source, gpointer callback_data, GSourceCallbackFuncs *callback_funcs)
{
  GMainContext *context;
  gpointer old_cb_data;
  GSourceCallbackFuncs *old_cb_funcs;
  g_return_if_fail (source != NULL);
  g_return_if_fail (callback_funcs != NULL || callback_data == NULL);
  context = source->context;
  if (context)
    LOCK_CONTEXT (context);
  old_cb_data = source->callback_data;
  old_cb_funcs = source->callback_funcs;
  source->callback_data = callback_data;
  source->callback_funcs = callback_funcs;
  if (context)
    UNLOCK_CONTEXT (context);
  if (old_cb_funcs)
    old_cb_funcs->unref (old_cb_data);
}