davemds pushed a commit to branch master.
commit 16ecc8ca4b6136d8875d9a374c30c57015e8ef6d
Author: davemds <[email protected]>
Date: Sat Mar 30 12:21:13 2013 +0100
* remove Eo.is_valid property as it do not check what it say
* Using Eina_Hash in object_mapping doesn't worth the pain
* extended object mapping is not required anymore
---
efl/eo/efl.eo.pyx | 36 +++++-------------------------------
1 file changed, 5 insertions(+), 31 deletions(-)
diff --git a/efl/eo/efl.eo.pyx b/efl/eo/efl.eo.pyx
index e97c1ae..1c80c01 100644
--- a/efl/eo/efl.eo.pyx
+++ b/efl/eo/efl.eo.pyx
@@ -207,10 +207,11 @@ cdef void _METHOD_DEPRECATED(object self, char *message):
######################################################################
-"""Object mapping is a dictionary into which object type names can be
+"""
+Object mapping is a dictionary into which object type names can be
registered. These can be used to find a bindings class for an object using
-the object_from_instance function."""
-# TODO: As a further optimization, make this C only, probably Eina Hash table.
+the object_from_instance function.
+"""
cdef dict object_mapping = dict()
@@ -255,28 +256,6 @@ cdef object object_from_instance(cEo *obj):
o = cls.__new__(cls)
o._set_obj(obj)
return o
-#
-# TODO extended object mapping (for SmartObject, EdjeExternal, etc)
-#
-# t = evas_object_type_get(obj)
-# if t == NULL:
-# raise ValueError("Evas object %#x does not have a type!" %
-# <long>obj)
-# ot = _ctouni(t)
-# c = Canvas_from_instance(evas_object_evas_get(obj))
-# cls = object_mapping.get(ot, None)
-# if cls is None:
-# cls_resolver = extended_object_mapping.get(ot, None)
-# if cls_resolver is None:
-# warnings.warn(
-# ("Evas_Object %#x of type %s has no direct or "
-# "extended mapping! Using generic wrapper.") %
-# (<unsigned long>obj, ot))
-# cls = Object
-# else:
-# cls = cls_resolver(<unsigned long>obj)
-# o = cls.__new__(cls)
-# o._set_evas(c)
######################################################################
@@ -380,13 +359,8 @@ cdef class Eo(object):
# print("Eo delete: %s" % self.__repr__())
# eo_del(self.obj)
- property is_valid:
- """Whether the Eo C object associated with this python object is
valid."""
- def __get__(self):
- return self.obj != NULL
-
- # TODO: Remove this if not needed
def is_deleted(self):
+ "Check if the object has been deleted thus leaving the object shallow"
return bool(self.obj == NULL)
#
--
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2