Enlightenment CVS committal
Author : ulisses
Project : e17
Module : proto/python-efl
Dir : e17/proto/python-efl/python-evas/evas
Modified Files:
evas.c_evas_object.pxi evas.c_evas_object_callbacks.pxi
evas.c_evas_object_image.pxi evas.c_evas_object_smart.pxi
Log Message:
Make python-efl thread-safe.
- acquiring/releasing GIL using 'with GIL' annotation
- bumped version number
===================================================================
RCS file: /cvs/e/e17/proto/python-efl/python-evas/evas/evas.c_evas_object.pxi,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- evas.c_evas_object.pxi 28 Sep 2007 18:06:26 -0000 1.16
+++ evas.c_evas_object.pxi 1 Oct 2007 04:31:38 -0000 1.17
@@ -24,7 +24,8 @@
return 1
-cdef void obj_free_cb(void *data, Evas *e, Evas_Object *obj, void *event_info):
+cdef void obj_free_cb(void *data, Evas *e,
+ Evas_Object *obj, void *event_info) with GIL:
cdef Object self
self = <Object>data
===================================================================
RCS file: /cvs/e/e17/proto/python-efl/python-evas/evas/evas.c_evas_object_callbacks.pxi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evas.c_evas_object_callbacks.pxi 21 Sep 2007 23:56:05 -0000 1.3
+++ evas.c_evas_object_callbacks.pxi 1 Oct 2007 04:31:38 -0000 1.4
@@ -24,91 +24,104 @@
return 1
-cdef void cb_mouse_in(void *data, Evas *e, Evas_Object *obj, void *e_inf):
+cdef void cb_mouse_in(void *data, Evas *e,
+ Evas_Object *obj, void *e_inf) with GIL:
cdef EventMouseIn event
event = EventMouseIn()
event._set_obj(e_inf)
cb_dispatcher(<Object>data, event, EVAS_CALLBACK_MOUSE_IN)
-cdef void cb_mouse_out(void *data, Evas *e, Evas_Object *obj, void *e_inf):
+cdef void cb_mouse_out(void *data, Evas *e,
+ Evas_Object *obj, void *e_inf) with GIL:
cdef EventMouseOut event
event = EventMouseOut()
event._set_obj(e_inf)
cb_dispatcher(<Object>data, event, EVAS_CALLBACK_MOUSE_OUT)
-cdef void cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *e_inf):
+cdef void cb_mouse_down(void *data, Evas *e,
+ Evas_Object *obj, void *e_inf) with GIL:
cdef EventMouseDown event
event = EventMouseDown()
event._set_obj(e_inf)
cb_dispatcher(<Object>data, event, EVAS_CALLBACK_MOUSE_DOWN)
-cdef void cb_mouse_up(void *data, Evas *e, Evas_Object *obj, void *e_inf):
+cdef void cb_mouse_up(void *data, Evas *e,
+ Evas_Object *obj, void *e_inf) with GIL:
cdef EventMouseUp event
event = EventMouseUp()
event._set_obj(e_inf)
cb_dispatcher(<Object>data, event, EVAS_CALLBACK_MOUSE_UP)
-cdef void cb_mouse_move(void *data, Evas *e, Evas_Object *obj, void *e_inf):
+cdef void cb_mouse_move(void *data, Evas *e,
+ Evas_Object *obj, void *e_inf) with GIL:
cdef EventMouseMove event
event = EventMouseMove()
event._set_obj(e_inf)
cb_dispatcher(<Object>data, event, EVAS_CALLBACK_MOUSE_MOVE)
-cdef void cb_mouse_wheel(void *data, Evas *e, Evas_Object *obj, void *e_inf):
+cdef void cb_mouse_wheel(void *data, Evas *e,
+ Evas_Object *obj, void *e_inf) with GIL:
cdef EventMouseWheel event
event = EventMouseWheel()
event._set_obj(e_inf)
cb_dispatcher(<Object>data, event, EVAS_CALLBACK_MOUSE_WHEEL)
-cdef void cb_free(void *data, Evas *e, Evas_Object *obj, void *e_inf):
+cdef void cb_free(void *data, Evas *e,
+ Evas_Object *obj, void *e_inf) with GIL:
cb_dispatcher2(<Object>data, EVAS_CALLBACK_FREE)
-cdef void cb_key_down(void *data, Evas *e, Evas_Object *obj, void *e_inf):
+cdef void cb_key_down(void *data, Evas *e,
+ Evas_Object *obj, void *e_inf) with GIL:
cdef EventKeyDown event
event = EventKeyDown()
event._set_obj(e_inf)
cb_dispatcher(<Object>data, event, EVAS_CALLBACK_KEY_DOWN)
-cdef void cb_key_up(void *data, Evas *e, Evas_Object *obj, void *e_inf):
+cdef void cb_key_up(void *data, Evas *e,
+ Evas_Object *obj, void *e_inf) with GIL:
cdef EventKeyUp event
event = EventKeyUp()
event._set_obj(e_inf)
cb_dispatcher(<Object>data, event, EVAS_CALLBACK_KEY_UP)
-cdef void cb_focus_in(void *data, Evas *e, Evas_Object *obj, void *e_inf):
+cdef void cb_focus_in(void *data, Evas *e,
+ Evas_Object *obj, void *e_inf) with GIL:
cb_dispatcher2(<Object>data, EVAS_CALLBACK_FOCUS_IN)
-cdef void cb_focus_out(void *data, Evas *e, Evas_Object *obj, void *e_inf):
+cdef void cb_focus_out(void *data, Evas *e,
+ Evas_Object *obj, void *e_inf) with GIL:
cb_dispatcher2(<Object>data, EVAS_CALLBACK_FOCUS_OUT)
-cdef void cb_show(void *data, Evas *e, Evas_Object *obj, void *e_inf):
+cdef void cb_show(void *data, Evas *e, Evas_Object *obj, void *e_inf) with GIL:
cb_dispatcher2(<Object>data, EVAS_CALLBACK_SHOW)
-cdef void cb_hide(void *data, Evas *e, Evas_Object *obj, void *e_inf):
+cdef void cb_hide(void *data, Evas *e, Evas_Object *obj, void *e_inf) with GIL:
cb_dispatcher2(<Object>data, EVAS_CALLBACK_HIDE)
-cdef void cb_move(void *data, Evas *e, Evas_Object *obj, void *e_inf):
+cdef void cb_move(void *data, Evas *e, Evas_Object *obj, void *e_inf) with GIL:
cb_dispatcher2(<Object>data, EVAS_CALLBACK_MOVE)
-cdef void cb_resize(void *data, Evas *e, Evas_Object *obj, void *e_inf):
+cdef void cb_resize(void *data, Evas *e,
+ Evas_Object *obj, void *e_inf) with GIL:
cb_dispatcher2(<Object>data, EVAS_CALLBACK_RESIZE)
-cdef void cb_restack(void *data, Evas *e, Evas_Object *obj, void *e_inf):
+cdef void cb_restack(void *data, Evas *e,
+ Evas_Object *obj, void *e_inf) with GIL:
cb_dispatcher2(<Object>data, EVAS_CALLBACK_RESTACK)
===================================================================
RCS file: /cvs/e/e17/proto/python-efl/python-evas/evas/evas.c_evas_object_image.pxi,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evas.c_evas_object_image.pxi 28 Sep 2007 18:06:26 -0000 1.6
+++ evas.c_evas_object_image.pxi 1 Oct 2007 04:31:38 -0000 1.7
@@ -345,8 +345,9 @@
-cdef void _cb_on_filled_image_resize(void *data, Evas *e, Evas_Object *obj,
- void *event_info):
+cdef void _cb_on_filled_image_resize(void *data, Evas *e,
+ Evas_Object *obj,
+ void *event_info) with GIL:
cdef int w, h
evas_object_geometry_get(obj, NULL, NULL, &w, &h)
evas_object_image_fill_set(obj, 0, 0, w, h)
===================================================================
RCS file: /cvs/e/e17/proto/python-efl/python-evas/evas/evas.c_evas_object_smart.pxi,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- evas.c_evas_object_smart.pxi 28 Sep 2007 18:06:26 -0000 1.17
+++ evas.c_evas_object_smart.pxi 1 Oct 2007 04:31:38 -0000 1.18
@@ -7,7 +7,7 @@
import traceback
-cdef void _smart_object_delete(Evas_Object *o):
+cdef void _smart_object_delete(Evas_Object *o) with GIL:
cdef SmartObject obj
obj = <SmartObject>evas_object_data_get(o, "python-evas")
@@ -60,7 +60,8 @@
obj._m_clip_unset = None
-cdef void _smart_object_move(Evas_Object *o, Evas_Coord x, Evas_Coord y):
+cdef void _smart_object_move(Evas_Object *o,
+ Evas_Coord x, Evas_Coord y) with GIL:
cdef SmartObject obj
obj = <SmartObject>evas_object_data_get(o, "python-evas")
if obj._m_move is not None:
@@ -70,7 +71,8 @@
traceback.print_exc()
-cdef void _smart_object_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h):
+cdef void _smart_object_resize(Evas_Object *o,
+ Evas_Coord w, Evas_Coord h) with GIL:
cdef SmartObject obj
obj = <SmartObject>evas_object_data_get(o, "python-evas")
if obj._m_resize is not None:
@@ -80,7 +82,7 @@
traceback.print_exc()
-cdef void _smart_object_show(Evas_Object *o):
+cdef void _smart_object_show(Evas_Object *o) with GIL:
cdef SmartObject obj
obj = <SmartObject>evas_object_data_get(o, "python-evas")
if obj._m_show is not None:
@@ -90,7 +92,7 @@
traceback.print_exc()
-cdef void _smart_object_hide(Evas_Object *o):
+cdef void _smart_object_hide(Evas_Object *o) with GIL:
cdef SmartObject obj
obj = <SmartObject>evas_object_data_get(o, "python-evas")
if obj._m_hide is not None:
@@ -100,7 +102,8 @@
traceback.print_exc()
-cdef void _smart_object_color_set(Evas_Object *o, int r, int g, int b, int a):
+cdef void _smart_object_color_set(Evas_Object *o,
+ int r, int g, int b, int a) with GIL:
cdef SmartObject obj
obj = <SmartObject>evas_object_data_get(o, "python-evas")
if obj._m_color_set is not None:
@@ -110,7 +113,7 @@
traceback.print_exc()
-cdef void _smart_object_clip_set(Evas_Object *o, Evas_Object *clip):
+cdef void _smart_object_clip_set(Evas_Object *o, Evas_Object *clip) with GIL:
cdef SmartObject obj
cdef Object other
obj = <SmartObject>evas_object_data_get(o, "python-evas")
@@ -122,7 +125,7 @@
traceback.print_exc()
-cdef void _smart_object_clip_unset(Evas_Object *o):
+cdef void _smart_object_clip_unset(Evas_Object *o) with GIL:
cdef SmartObject obj
obj = <SmartObject>evas_object_data_get(o, "python-evas")
if obj._m_clip_unset is not None:
@@ -132,7 +135,8 @@
traceback.print_exc()
-cdef void _smart_callback(void *data, Evas_Object *o, void *event_info):
+cdef void _smart_callback(void *data,
+ Evas_Object *o, void *event_info) with GIL:
cdef SmartObject obj
cdef object event, ei
obj = <SmartObject>evas_object_data_get(o, "python-evas")
|