raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a5c7c65658852f47688becf552ab33b22bfa48f8

commit a5c7c65658852f47688becf552ab33b22bfa48f8
Author: Carsten Haitzler <ras...@rasterman.com>
Date:   Mon Aug 9 18:22:06 2021 +0100

    edje - we can't rely on string ptr coming from eet file anymore...
---
 src/lib/edje/edje_util.c | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 625898947d..bfbd7c2649 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -5812,7 +5812,6 @@ _edje_real_part_get(const Edje *ed, const char *part)
 void *
 _edje_hash_find_helper(const Eina_Hash *hash, const char *key)
 {
-   static const char *remember_key = NULL;
    void *data;
    int i, j;
    char **tokens;
@@ -5822,20 +5821,6 @@ _edje_hash_find_helper(const Eina_Hash *hash, const char 
*key)
    if (data)
      return data;
 
-   // We only receive pointer from Eet files as key, we can
-   // assume them constant over the life time of the program.
-   if (remember_key == key)
-     return NULL;
-
-   // It is usually faster to walk the string once to check
-   // if there will be any tokens to process, that to allocate
-   // an array, copy one token, and then just free it.
-   if (strchr(key, '/') == NULL)
-     {
-        remember_key = key;
-        return NULL;
-     }
-
    tokens = eina_str_split_full(key, "/", 0, &tokens_count);
    if ((tokens) && (tokens_count > 1))
      {
@@ -5860,10 +5845,6 @@ _edje_hash_find_helper(const Eina_Hash *hash, const char 
*key)
 
         eina_strbuf_free(buf);
      }
-   else
-     {
-        remember_key = key;
-     }
 
    if (tokens)
      {

-- 


Reply via email to