all efl object deletion functions now take NULL without crashing or erroring

SVN revision: 81667
devs/devilhorns/wayland_egl
Mike Blumenkrantz 10 years ago
parent f5a98df8de
commit b2de05f49a
  1. 1
      ChangeLog
  2. 1
      NEWS
  3. 1
      src/lib/ecore/ecore_anim.c
  4. 3
      src/lib/ecore/ecore_events.c
  5. 1
      src/lib/ecore/ecore_exe.c
  6. 1
      src/lib/ecore/ecore_idle_enterer.c
  7. 1
      src/lib/ecore/ecore_idle_exiter.c
  8. 1
      src/lib/ecore/ecore_idler.c
  9. 1
      src/lib/ecore/ecore_job.c
  10. 2
      src/lib/ecore/ecore_main.c
  11. 1
      src/lib/ecore/ecore_pipe.c
  12. 1
      src/lib/ecore/ecore_poll.c
  13. 1
      src/lib/ecore/ecore_timer.c
  14. 2
      src/lib/ecore_con/ecore_con.c
  15. 1
      src/lib/ecore_evas/ecore_evas.c
  16. 1
      src/lib/ecore_file/ecore_file_monitor.c
  17. 2
      src/lib/ecore_ipc/ecore_ipc.c
  18. 1
      src/lib/eio/eio_file.c

@ -1,6 +1,7 @@
2012-12-24 Mike Blumenkrantz
* eina_magic_fail() now throws error messages on NULL pointers instead of critical
* all efl object-freeing functions now take NULL without crashing or erroring
2012-12-19 Gustavo Sverzut Barbieri (k-s)

@ -63,6 +63,7 @@ Improvements:
repeatedly calling malloc/free.
* Display more information with eet -l -v.
* eina_magic_fail() now throws error messages on NULL pointers instead of critical
* all efl object-freeing functions now take NULL without crashing or erroring
Fixes:
* Fix PPC (big endian) image codec bug.

@ -398,6 +398,7 @@ ecore_animator_del(Ecore_Animator *obj)
{
void *data = NULL;
if (!obj) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
Ecore_Animator_Private_Data *animator = eo_data_get(obj, MY_CLASS);
_ecore_lock();

@ -128,6 +128,7 @@ ecore_event_handler_del(Ecore_Event_Handler *event_handler)
{
void *data = NULL;
if (!event_handler) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
_ecore_lock();
if (!ECORE_MAGIC_CHECK(event_handler, ECORE_MAGIC_EVENT_HANDLER))
@ -215,6 +216,7 @@ ecore_event_del(Ecore_Event *event)
{
void *data = NULL;
if (!event) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
_ecore_lock();
if (!ECORE_MAGIC_CHECK(event, ECORE_MAGIC_EVENT))
@ -272,6 +274,7 @@ ecore_event_filter_del(Ecore_Event_Filter *ef)
{
void *data = NULL;
if (!ef) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
_ecore_lock();
if (!ECORE_MAGIC_CHECK(ef, ECORE_MAGIC_EVENT_FILTER))

@ -1068,6 +1068,7 @@ ecore_exe_free(Ecore_Exe *exe)
int ok = 0;
int result;
if (!exe) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
{

@ -157,6 +157,7 @@ ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer)
{
void *data = NULL;
if (!idle_enterer) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
_ecore_lock();

@ -110,6 +110,7 @@ ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter)
{
void *data;
if (!idle_exiter) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
_ecore_lock();

@ -91,6 +91,7 @@ ecore_idler_del(Ecore_Idler *idler)
{
void *data = NULL;
if (!idler) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
_ecore_lock();

@ -122,6 +122,7 @@ ecore_job_del(Ecore_Job *obj)
{
void *data;
if (!obj) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
Ecore_Job_Private_Data *job = eo_data_get(obj, MY_CLASS);
data = job->data;

@ -1174,6 +1174,7 @@ ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler)
{
void *ret = NULL;
if (!fd_handler) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
_ecore_lock();
@ -1193,6 +1194,7 @@ unlock:
EAPI void *
ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler)
{
if (!win32_handler) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
if (!ECORE_MAGIC_CHECK(win32_handler, ECORE_MAGIC_WIN32_HANDLER))
{

@ -142,6 +142,7 @@ EAPI void *
ecore_pipe_del(Ecore_Pipe *p)
{
void *r;
if (!p) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
_ecore_lock();
r = _ecore_pipe_del(p);

@ -392,6 +392,7 @@ ecore_poller_del(Ecore_Poller *obj)
{
void *data;
if (!obj) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
Ecore_Poller_Private_Data *poller = eo_data_get(obj, MY_CLASS);
/* we are walking the poller list - a bad idea to remove from it while

@ -272,6 +272,7 @@ ecore_timer_del(Ecore_Timer *timer)
{
void *data = NULL;
if (!timer) return NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
_ecore_lock();

@ -552,6 +552,7 @@ ecore_con_server_timeout_get(Ecore_Con_Server *svr)
EAPI void *
ecore_con_server_del(Ecore_Con_Server *svr)
{
if (!svr) return NULL;
if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_CON_SERVER))
{
ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_CON_SERVER, "ecore_con_server_del");
@ -854,6 +855,7 @@ ecore_con_client_timeout_get(Ecore_Con_Client *cl)
EAPI void *
ecore_con_client_del(Ecore_Con_Client *cl)
{
if (!cl) return NULL;
if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_CON_CLIENT))
{
ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_CON_CLIENT, "ecore_con_client_del");

@ -699,6 +699,7 @@ ecore_evas_ecore_evas_get(const Evas *e)
EAPI void
ecore_evas_free(Ecore_Evas *ee)
{
if (!ee) return;
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
{
ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,

@ -67,6 +67,7 @@ ecore_file_monitor_add(const char *path,
EAPI void
ecore_file_monitor_del(Ecore_File_Monitor *em)
{
if (!em) return;
EINA_SAFETY_ON_NULL_RETURN(em);
ecore_file_monitor_backend_del(em);
}

@ -458,6 +458,7 @@ ecore_ipc_server_del(Ecore_Ipc_Server *svr)
{
void *data;
if (!svr) return NULL;
if (!ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_IPC_SERVER))
{
ECORE_MAGIC_FAIL(svr, ECORE_MAGIC_IPC_SERVER,
@ -874,6 +875,7 @@ ecore_ipc_client_del(Ecore_Ipc_Client *cl)
void *data;
Ecore_Ipc_Server *svr;
if (!cl) return NULL;
if (!ECORE_MAGIC_CHECK(cl, ECORE_MAGIC_IPC_CLIENT))
{
ECORE_MAGIC_FAIL(cl, ECORE_MAGIC_IPC_CLIENT,

@ -846,6 +846,7 @@ eio_file_stat_ls(const char *dir,
EAPI Eina_Bool
eio_file_cancel(Eio_File *ls)
{
if (!ls) return EINA_FALSE;
EINA_SAFETY_ON_NULL_RETURN_VAL(ls, EINA_FALSE);
return ecore_thread_cancel(ls->thread);
}

Loading…
Cancel
Save