summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-08-13 09:57:47 -0400
committerMike Blumenkrantz <zmike@samsung.com>2018-08-13 10:02:45 -0400
commite308513f2e0afb4152c5a389f43b3a3816613c64 (patch)
tree3370745405550bb1efd0922f8d0e8de01e4523d6
parent26bedebc18c263b8dc2f5407484b771c19f8532f (diff)
downloadefl-e308513f2e0afb4152c5a389f43b3a3816613c64.tar.gz
emotion: make intree running work
Summary: before it would have only worked if there would have been the architecture in the path, which was definitly not the case. This fixes the problems. Depends on D6795 Subscribers: cedric, #reviewers, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6819
-rw-r--r--src/lib/emotion/emotion_modules.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/lib/emotion/emotion_modules.c b/src/lib/emotion/emotion_modules.c
index a746f1d5dd..868d223f55 100644
--- a/src/lib/emotion/emotion_modules.c
+++ b/src/lib/emotion/emotion_modules.c
@@ -93,9 +93,15 @@ _emotion_modules_load(void)
const char **itr;
for (itr = built_modules; *itr != NULL; itr++)
{
+ Eina_Module *m;
bs_mod_get(buf, sizeof(buf), "emotion", *itr);
- _emotion_modules = eina_module_list_get(_emotion_modules, buf,
- EINA_FALSE, NULL, NULL);
+ m = eina_module_new(buf);
+
+ if (!m) continue;
+
+ if (!_emotion_modules)
+ _emotion_modules = eina_array_new(4);
+ eina_array_push(_emotion_modules, m);
}
return;
}
@@ -313,8 +319,8 @@ _find_mod(const char *name)
EINA_ARRAY_ITER_NEXT(_emotion_modules, i, m, iterator)
{
const char *path = eina_module_file_get(m);
- const char *p, *p1, *p2;
- int found, len;
+ const char *p, *p1, *p2, *p3;
+ int found, len, len2;
if ((!path) || (!path[0])) continue;
// path is /*/modulename/ARCH/module.* - we want "modulename"
@@ -330,6 +336,7 @@ _find_mod(const char *name)
// found == 1 -> p = /module.*
// found == 2 -> p = /ARCH/module.*
// found == 3 -> p = /modulename/ARCH/module.*
+ if (found == 1) p3 = p;
if (found == 2) p2 = p;
if (found == 3)
{
@@ -342,9 +349,10 @@ _find_mod(const char *name)
{
p1++;
len = p2 - p1;
- if (len == inlen)
+ len2 = p3 - (p2 + 1);
+ if (len == inlen || len2 == inlen)
{
- if (!strncmp(p1, name, len)) return m;
+ if (!strncmp(p1, name, len) || !strncmp(p2 + 1, name, len2)) return m;
}
}
}