Expose object_from_instance and the inverse to other C code

This create the efl.eo_api.h file that you can copy to your source if you want to use the exported api
This commit is contained in:
Davide Andreoli 2014-08-16 12:33:29 +02:00
parent 042dc0f835
commit 9a78c4e22d
2 changed files with 9 additions and 2 deletions

View File

@ -95,7 +95,7 @@ cdef void _object_mapping_unregister(char *name):
eina_hash_del(object_mapping, name, NULL)
cdef object object_from_instance(cEo *obj):
cdef api object object_from_instance(cEo *obj):
""" Create a python object from a C Eo object pointer. """
cdef:
void *data
@ -140,6 +140,10 @@ cdef object object_from_instance(cEo *obj):
o._set_obj(obj)
return o
cdef api cEo *instance_from_object(object obj):
cdef Eo o = obj
return o.obj
cdef void _register_decorated_callbacks(Eo obj):
"""

View File

@ -30,8 +30,11 @@ cdef:
int PY_REFCOUNT(object o)
object object_from_instance(cEo *obj)
void _object_mapping_register(char *name, object cls) except *
void _object_mapping_unregister(char *name)
void _register_decorated_callbacks(Eo obj)
cdef api:
object object_from_instance(cEo *obj)
cEo *instance_from_object(object o)