Use atexit to shutdown eo, evas and ecore modules
They already had a call to init in the module, thus there was a mismatch not obvious to users.
This commit is contained in:
parent
1d5ae5fbc9
commit
219ba9cdd9
|
@ -246,11 +246,12 @@ Classes
|
|||
"""
|
||||
|
||||
from libc.stdint cimport uintptr_t
|
||||
import traceback
|
||||
from efl.eo cimport Eo, PY_REFCOUNT
|
||||
from efl.utils.conversions cimport _ctouni
|
||||
from cpython cimport Py_INCREF, Py_DECREF
|
||||
|
||||
import traceback
|
||||
import atexit
|
||||
|
||||
|
||||
cdef Eina_Bool _ecore_task_cb(void *data) with gil:
|
||||
|
@ -342,6 +343,7 @@ include "efl.ecore_file_download.pxi"
|
|||
include "efl.ecore_file_monitor.pxi"
|
||||
|
||||
init()
|
||||
atexit.register(shutdown)
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
|
|
@ -55,6 +55,8 @@ cdef int PY_REFCOUNT(object o):
|
|||
cdef PyObject *obj = <PyObject *>o
|
||||
return obj.ob_refcnt
|
||||
|
||||
import atexit
|
||||
|
||||
######################################################################
|
||||
|
||||
def init():
|
||||
|
@ -66,6 +68,7 @@ def shutdown():
|
|||
return eo_shutdown()
|
||||
|
||||
init()
|
||||
atexit.register(shutdown)
|
||||
|
||||
def event_global_freeze_count_get():
|
||||
cdef int fcount = 0
|
||||
|
|
|
@ -965,6 +965,8 @@ from efl.utils.logger cimport add_logger
|
|||
|
||||
cdef int PY_EFL_EVAS_LOG_DOMAIN = add_logger(__name__).eina_log_domain
|
||||
|
||||
import atexit
|
||||
|
||||
|
||||
# TODO doc
|
||||
EVAS_HINT_FILL = -1.0
|
||||
|
@ -1189,3 +1191,4 @@ include "efl.evas_object_grid.pxi"
|
|||
|
||||
|
||||
init()
|
||||
atexit.register(shutdown)
|
||||
|
|
Loading…
Reference in New Issue