/* Returns: The main loop recursion level in the current thread  */
int g_main_depth(void)
/* Returns: The main loop recursion level in the current thread  */
int g_main_depth(void)
{
  GMainDispatch *dispatch = get_dispatch ();
  return dispatch->depth;
}