Revert "Eo: Prevent shutdown from actually doing anything"
authorTom Hacohen <tom@stosb.com>
Wed, 3 Feb 2016 15:39:25 +0000 (15:39 +0000)
committerTom Hacohen <tom@stosb.com>
Thu, 4 Feb 2016 09:27:15 +0000 (09:27 +0000)
This commit was a workaround to let us shutdown and then init eo without
any issues. It leaks and it's wrong. This will properly be fixed in the
next commit.

This reverts commit e47edc250dc715a6b0f94be4b1cb81d32e9d97fe.

src/lib/eo/eo.c

index 2fd8f53..94ba105 100644 (file)
@@ -1853,21 +1853,10 @@ eo_shutdown(void)
 {
    size_t i;
    _Eo_Class **cls_itr = _eo_classes;
-   const char *s;
 
-   EINA_SAFETY_ON_FALSE_RETURN_VAL(_eo_init_count > 0, EINA_FALSE);
    if (--_eo_init_count > 0)
      return EINA_TRUE;
 
-   /* We can't actually shutdown Eo for similar reasons that closing a
-    * shared library is risky: all Eo_Class IDs are stored inside their
-    * classname_get() function and can't be safely reset to NULL. */
-   if (!(s = getenv("EO_SHUTDOWN_ENABLE")) || (atoi(s) != 1))
-     {
-        _eo_init_count = 1;
-        return EINA_TRUE;
-     }
-
    eina_log_timing(_eo_log_dom,
                    EINA_LOG_STATE_START,
                    EINA_LOG_STATE_SHUTDOWN);
@@ -1887,10 +1876,7 @@ eo_shutdown(void)
    eina_spinlock_free(&_eo_class_creation_lock);
 
    if (_eo_call_stack_key != 0)
-     {
-        eina_tls_free(_eo_call_stack_key);
-        _eo_call_stack_key = 0;
-     }
+     eina_tls_free(_eo_call_stack_key);
 
    _eo_free_ids_tables();