/* Returns: the ID (greater than 0) for the source  */
guint g_source_get_id(GSource *source)
/* Returns: the ID (greater than 0) for the source  */
guint g_source_get_id(GSource *source)
{
  guint result;
  g_return_val_if_fail (source != NULL, 0);
  g_return_val_if_fail (source->context != NULL, 0);
  LOCK_CONTEXT (source->context);
  result = source->source_id;
  UNLOCK_CONTEXT (source->context);
  return result;
}