/* Typically, you won't use this function. Instead use functions specific to the type of source you are using.  */
void g_source_set_callback(GSource *source, GSourceFunc func, gpointer data, GDestroyNotify notify)
/* Typically, you won't use this function. Instead use functions specific to the type of source you are using.  */
void g_source_set_callback(GSource *source, GSourceFunc func, gpointer data, GDestroyNotify notify)
{
  GSourceCallback *new_callback;
  g_return_if_fail (source != NULL);
  new_callback = g_new (GSourceCallback, 1);
  new_callback->ref_count = 1;
  new_callback->func = func;
  new_callback->data = data;
  new_callback->notify = notify;
  g_source_set_callback_indirect (source, new_callback, &g_source_callback_funcs);
}