summaryrefslogtreecommitdiff
path: root/src/lib/emotion
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 /src/lib/emotion
parent26bedebc18c263b8dc2f5407484b771c19f8532f (diff)
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
Diffstat (limited to 'src/lib/emotion')
-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)
93 const char **itr; 93 const char **itr;
94 for (itr = built_modules; *itr != NULL; itr++) 94 for (itr = built_modules; *itr != NULL; itr++)
95 { 95 {
96 Eina_Module *m;
96 bs_mod_get(buf, sizeof(buf), "emotion", *itr); 97 bs_mod_get(buf, sizeof(buf), "emotion", *itr);
97 _emotion_modules = eina_module_list_get(_emotion_modules, buf, 98 m = eina_module_new(buf);
98 EINA_FALSE, NULL, NULL); 99
100 if (!m) continue;
101
102 if (!_emotion_modules)
103 _emotion_modules = eina_array_new(4);
104 eina_array_push(_emotion_modules, m);
99 } 105 }
100 return; 106 return;
101 } 107 }
@@ -313,8 +319,8 @@ _find_mod(const char *name)
313 EINA_ARRAY_ITER_NEXT(_emotion_modules, i, m, iterator) 319 EINA_ARRAY_ITER_NEXT(_emotion_modules, i, m, iterator)
314 { 320 {
315 const char *path = eina_module_file_get(m); 321 const char *path = eina_module_file_get(m);
316 const char *p, *p1, *p2; 322 const char *p, *p1, *p2, *p3;
317 int found, len; 323 int found, len, len2;
318 324
319 if ((!path) || (!path[0])) continue; 325 if ((!path) || (!path[0])) continue;
320 // path is /*/modulename/ARCH/module.* - we want "modulename" 326 // path is /*/modulename/ARCH/module.* - we want "modulename"
@@ -330,6 +336,7 @@ _find_mod(const char *name)
330 // found == 1 -> p = /module.* 336 // found == 1 -> p = /module.*
331 // found == 2 -> p = /ARCH/module.* 337 // found == 2 -> p = /ARCH/module.*
332 // found == 3 -> p = /modulename/ARCH/module.* 338 // found == 3 -> p = /modulename/ARCH/module.*
339 if (found == 1) p3 = p;
333 if (found == 2) p2 = p; 340 if (found == 2) p2 = p;
334 if (found == 3) 341 if (found == 3)
335 { 342 {
@@ -342,9 +349,10 @@ _find_mod(const char *name)
342 { 349 {
343 p1++; 350 p1++;
344 len = p2 - p1; 351 len = p2 - p1;
345 if (len == inlen) 352 len2 = p3 - (p2 + 1);
353 if (len == inlen || len2 == inlen)
346 { 354 {
347 if (!strncmp(p1, name, len)) return m; 355 if (!strncmp(p1, name, len) || !strncmp(p2 + 1, name, len2)) return m;
348 } 356 }
349 } 357 }
350 } 358 }