gmain: Handle case where source id overflows

0 is not a valid source id, but for long-lived programs that rapidly
create/destroy sources, it's possible for the source id to overflow.
We should handle this, because the documentation implies we will.

https://bugzilla.gnome.org/show_bug.cgi?id=687098
This commit is contained in:
Colin Walters
2012-11-08 09:12:25 -05:00
parent 606aa26acf
commit b98a1c8df3
4 changed files with 165 additions and 6 deletions

View File

@@ -40,7 +40,8 @@ glib__private__ (void)
g_get_worker_context,
g_check_setuid
g_check_setuid,
g_main_context_new_with_next_id
};
return &table;