summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortasn <tasn>2012-07-10 14:01:54 +0000
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2012-07-10 14:01:54 +0000
commit23e47d72b0e8c4fb0babca6a1dbdc37a5421ec4a (patch)
tree80a63699ac3926a6f6830b283dfa2c23a2301001
parent52184813176771f2b8a5b099a7cb926f9eef9ad1 (diff)
downloadeobj-23e47d72b0e8c4fb0babca6a1dbdc37a5421ec4a.tar.gz
eobj-23e47d72b0e8c4fb0babca6a1dbdc37a5421ec4a.tar.bz2
eobj-23e47d72b0e8c4fb0babca6a1dbdc37a5421ec4a.zip
Eo: Cosmetic changes.
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/PROTO/eobj@73529 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
-rw-r--r--src/lib/eo.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/lib/eo.c b/src/lib/eo.c
index c1fdc1d..ad195a9 100644
--- a/src/lib/eo.c
+++ b/src/lib/eo.c
@@ -53,8 +53,8 @@ struct _Eo {
};
/* Start of Dich */
-/* Dich search, split to 0xff 0xff 0xffff */
+/* How we search and store the implementations in classes. */
#define DICH_CHAIN_LAST_BITS 5
#define DICH_CHAIN_LAST_SIZE (1 << DICH_CHAIN_LAST_BITS)
#define DICH_CHAIN1(x) ((x) / DICH_CHAIN_LAST_SIZE)
@@ -70,11 +70,6 @@ struct _Eo {
#define EO_ALIGN_SIZE(size) \
((size) + (sizeof(void *) - ((size) % sizeof(void *))))
-/* Structure of Eo_Op is:
- * 16bit: class
- * 16bit: op.
- */
-
typedef struct _Dich_Chain1 Dich_Chain1;
typedef struct
@@ -90,8 +85,8 @@ struct _Dich_Chain1
typedef struct
{
- const Eo_Class *klass;
- size_t offset;
+ const Eo_Class *klass;
+ size_t offset;
} Eo_Extension_Data_Offset;
struct _Eo_Class
@@ -1404,14 +1399,14 @@ _eo_data_get(const Eo *obj, const Eo_Class *klass)
{
if (doff_itr->klass == klass)
return ((char *) obj) + EO_ALIGN_SIZE(sizeof(*obj)) +
- doff_itr->offset;
+ doff_itr->offset;
doff_itr++;
}
}
else
{
- return ((char *) obj) + EO_ALIGN_SIZE(sizeof(*obj)) +
- klass->data_offset;
+ return ((char *) obj) + EO_ALIGN_SIZE(sizeof(*obj)) +
+ klass->data_offset;
}
}
@@ -1476,6 +1471,12 @@ eo_init(void)
eina_magic_string_static_set(EO_CLASS_EINA_MAGIC,
EO_CLASS_EINA_MAGIC_STR);
+#ifndef NDEBUG
+ /* Call it just for coverage purposes. Ugly I know, but I like it better than
+ * casting everywhere else. */
+ _eo_class_isa_func(NULL, NULL, NULL);
+#endif
+
return EINA_TRUE;
}