freeze/thaw debug!

SVN revision: 8688
This commit is contained in:
Carsten Haitzler 2004-01-28 02:43:13 +00:00
parent bc281b4e5a
commit 4bfe9af00a
3 changed files with 19 additions and 0 deletions

View File

@ -80,6 +80,8 @@ evas_event_thaw(Evas *e)
return;
MAGIC_CHECK_END();
e->events_frozen--;
if (e->events_frozen < 0)
evas_debug_generic(" Thaw of events when already thawed!!!\n");
}
/**

View File

@ -593,6 +593,7 @@ void evas_debug_error(void);
void evas_debug_input_null(void);
void evas_debug_magic_null(void);
void evas_debug_magic_wrong(DATA32 expected, DATA32 supplied);
void evas_debug_generic(const char *str);
char *evas_debug_magic_string_get(DATA32 magic);
void evas_object_smart_use(Evas_Smart *s);
void evas_object_smart_unuse(Evas_Smart *s);

View File

@ -153,6 +153,22 @@ evas_debug_magic_wrong(DATA32 expected, DATA32 supplied)
if (_evas_debug_abort) abort();
}
void
evas_debug_generic(const char *str)
{
if (!_evas_debug_init)
{
if (getenv("EVAS_DEBUG_SHOW")) _evas_debug_show = 1;
if (getenv("EVAS_DEBUG_ABORT")) _evas_debug_abort = 1;
_evas_debug_init = 1;
}
if (_evas_debug_show)
fprintf(stderr,
"*** EVAS ERROR:\n"
"%s", (char *)str);
if (_evas_debug_abort) abort();
}
char *
evas_debug_magic_string_get(DATA32 magic)
{