forked from enlightenment/efl
This is a small change, so I won't changelog it (or backport), but
make _shutdown() funcs across efl complain and be unhappy if you shutdown to < 0 shutdowns and not pull init count below 0. SVN revision: 71548
This commit is contained in:
parent
b5e054507a
commit
318bd30043
|
@ -228,6 +228,12 @@ ecore_shutdown(void)
|
||||||
* take a lock here because _ecore_event_shutdown() does callbacks
|
* take a lock here because _ecore_event_shutdown() does callbacks
|
||||||
*/
|
*/
|
||||||
_ecore_lock();
|
_ecore_lock();
|
||||||
|
if (_ecore_init_count <= 0)
|
||||||
|
{
|
||||||
|
ERR("Init count not greater than 0 in shutdown.");
|
||||||
|
_ecore_unlock();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (--_ecore_init_count != 0)
|
if (--_ecore_init_count != 0)
|
||||||
goto unlock;
|
goto unlock;
|
||||||
|
|
||||||
|
|
|
@ -170,6 +170,11 @@ _edje_lib_unref(void)
|
||||||
EAPI int
|
EAPI int
|
||||||
edje_shutdown(void)
|
edje_shutdown(void)
|
||||||
{
|
{
|
||||||
|
if (_edje_init_count <= 0)
|
||||||
|
{
|
||||||
|
ERR("Init count not greater than 0 in shutdown.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (--_edje_init_count != 0)
|
if (--_edje_init_count != 0)
|
||||||
return _edje_init_count;
|
return _edje_init_count;
|
||||||
|
|
||||||
|
|
|
@ -633,6 +633,11 @@ shutdown_eina:
|
||||||
EAPI int
|
EAPI int
|
||||||
eet_shutdown(void)
|
eet_shutdown(void)
|
||||||
{
|
{
|
||||||
|
if (eet_init_count <= 0)
|
||||||
|
{
|
||||||
|
ERR("Init count not greater than 0 in shutdown.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (--eet_init_count != 0)
|
if (--eet_init_count != 0)
|
||||||
return eet_init_count;
|
return eet_init_count;
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,11 @@ eina_fail:
|
||||||
EAPI int
|
EAPI int
|
||||||
eeze_shutdown(void)
|
eeze_shutdown(void)
|
||||||
{
|
{
|
||||||
|
if (_eeze_init_count <= 0)
|
||||||
|
{
|
||||||
|
EINA_LOG_ERR("Init count not greater than 0 in shutdown.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (--_eeze_init_count != 0)
|
if (--_eeze_init_count != 0)
|
||||||
return _eeze_init_count;
|
return _eeze_init_count;
|
||||||
|
|
||||||
|
|
|
@ -136,6 +136,11 @@ shutdown_eina:
|
||||||
EAPI int
|
EAPI int
|
||||||
efreet_shutdown(void)
|
efreet_shutdown(void)
|
||||||
{
|
{
|
||||||
|
if (_efreet_init_count <= 0)
|
||||||
|
{
|
||||||
|
ERR("Init count not greater than 0 in shutdown.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (--_efreet_init_count != 0)
|
if (--_efreet_init_count != 0)
|
||||||
return _efreet_init_count;
|
return _efreet_init_count;
|
||||||
|
|
||||||
|
|
|
@ -307,6 +307,11 @@ eina_init(void)
|
||||||
EAPI int
|
EAPI int
|
||||||
eina_shutdown(void)
|
eina_shutdown(void)
|
||||||
{
|
{
|
||||||
|
if (_eina_main_count <= 0)
|
||||||
|
{
|
||||||
|
ERR("Init count not greater than 0 in shutdown.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
_eina_main_count--;
|
_eina_main_count--;
|
||||||
if (EINA_UNLIKELY(_eina_main_count == 0))
|
if (EINA_UNLIKELY(_eina_main_count == 0))
|
||||||
{
|
{
|
||||||
|
|
|
@ -236,6 +236,11 @@ eio_shutdown(void)
|
||||||
Eio_Progress *pg;
|
Eio_Progress *pg;
|
||||||
Eio_File_Associate *asso;
|
Eio_File_Associate *asso;
|
||||||
|
|
||||||
|
if (_eio_count <= 0)
|
||||||
|
{
|
||||||
|
EINA_LOG_ERR("Init count not greater than 0 in shutdown.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
_eio_count--;
|
_eio_count--;
|
||||||
|
|
||||||
if (_eio_count > 0) return _eio_count;
|
if (_eio_count > 0) return _eio_count;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
@ -29,6 +30,11 @@ embryo_init(void)
|
||||||
EAPI int
|
EAPI int
|
||||||
embryo_shutdown(void)
|
embryo_shutdown(void)
|
||||||
{
|
{
|
||||||
|
if (_embryo_init_count <= 0)
|
||||||
|
{
|
||||||
|
printf("%s:%i Init count not greater than 0 in shutdown.", __FUNCTION__, __LINE__);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (--_embryo_init_count != 0)
|
if (--_embryo_init_count != 0)
|
||||||
return _embryo_init_count;
|
return _embryo_init_count;
|
||||||
|
|
||||||
|
|
|
@ -383,6 +383,11 @@ emotion_shutdown(void)
|
||||||
{
|
{
|
||||||
Emotion_Webcam *ew;
|
Emotion_Webcam *ew;
|
||||||
|
|
||||||
|
if (_emotion_webcams_count <= 0)
|
||||||
|
{
|
||||||
|
EINA_LOG_ERR("Init count not greater than 0 in shutdown.");
|
||||||
|
return EINA_FALSE;
|
||||||
|
}
|
||||||
if (--_emotion_webcams_count) return EINA_TRUE;
|
if (--_emotion_webcams_count) return EINA_TRUE;
|
||||||
|
|
||||||
EINA_LIST_FREE(_emotion_webcams->webcams, ew)
|
EINA_LIST_FREE(_emotion_webcams->webcams, ew)
|
||||||
|
|
|
@ -202,6 +202,11 @@ ethumb_init(void)
|
||||||
EAPI int
|
EAPI int
|
||||||
ethumb_shutdown(void)
|
ethumb_shutdown(void)
|
||||||
{
|
{
|
||||||
|
if (initcount <= 0)
|
||||||
|
{
|
||||||
|
EINA_LOG_ERR("Init count not greater than 0 in shutdown.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
initcount--;
|
initcount--;
|
||||||
if (initcount == 0)
|
if (initcount == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -77,6 +77,11 @@ evas_init(void)
|
||||||
EAPI int
|
EAPI int
|
||||||
evas_shutdown(void)
|
evas_shutdown(void)
|
||||||
{
|
{
|
||||||
|
if (_evas_init_count <= 0)
|
||||||
|
{
|
||||||
|
EINA_LOG_ERR("Init count not greater than 0 in shutdown.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (--_evas_init_count != 0)
|
if (--_evas_init_count != 0)
|
||||||
return _evas_init_count;
|
return _evas_init_count;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue