diff --git a/legacy/evas/src/lib/data/evas_hash.c b/legacy/evas/src/lib/data/evas_hash.c index 9220ed9ee8..7951747459 100644 --- a/legacy/evas/src/lib/data/evas_hash.c +++ b/legacy/evas/src/lib/data/evas_hash.c @@ -210,22 +210,48 @@ evas_hash_del(Evas_Hash *hash, const char *key, const void *data) Evas_Object_List *l; if (!hash) return NULL; - hash_num = _evas_hash_gen(key); - for (l = hash->buckets[hash_num]; l; l = l->next) + if (!key) { - el = (Evas_Hash_El *)l; - if (((key) && (!strcmp(el->key, key))) || - ((!key) && (el->data == data))) + int hash_num; + + for (hash_num = 0; hash_num < 256; hash_num++) { - hash->buckets[hash_num] = evas_object_list_remove(hash->buckets[hash_num], el); - free(el); - hash->population--; - if (hash->population <= 0) + for (l = hash->buckets[hash_num]; l; l = l->next) { - free(hash); - hash = NULL; + el = (Evas_Hash_El *)l; + if (el->data == data) + { + hash->buckets[hash_num] = evas_object_list_remove(hash->buckets[hash_num], el); + free(el); + hash->population--; + if (hash->population <= 0) + { + free(hash); + hash = NULL; + } + return hash; + } + } + } + } + else + { + hash_num = _evas_hash_gen(key); + for (l = hash->buckets[hash_num]; l; l = l->next) + { + el = (Evas_Hash_El *)l; + if (!strcmp(el->key, key)) + { + hash->buckets[hash_num] = evas_object_list_remove(hash->buckets[hash_num], el); + free(el); + hash->population--; + if (hash->population <= 0) + { + free(hash); + hash = NULL; + } + return hash; } - return hash; } } return hash; diff --git a/legacy/evas/src/lib/file/evas_module.c b/legacy/evas/src/lib/file/evas_module.c index a02d2a281e..099d28ed02 100644 --- a/legacy/evas/src/lib/file/evas_module.c +++ b/legacy/evas/src/lib/file/evas_module.c @@ -17,7 +17,6 @@ #include Evas_List *evas_modules = NULL; - static Evas_List *evas_module_paths = NULL; static void @@ -182,6 +181,7 @@ evas_module_init(void) } free(buf); } + closedir(dir); } } diff --git a/legacy/evas/src/modules/engines/cairo_x11/evas_engine.c b/legacy/evas/src/modules/engines/cairo_x11/evas_engine.c index 7028032baf..e551c65034 100644 --- a/legacy/evas/src/modules/engines/cairo_x11/evas_engine.c +++ b/legacy/evas/src/modules/engines/cairo_x11/evas_engine.c @@ -1066,7 +1066,7 @@ evas_engine_cairo_x11_image_format_get(void *data, void *image) /* FIXME */ re = (Render_Engine *)data; - return ""; + return NULL; } static void diff --git a/legacy/evas/src/modules/engines/directfb/evas_engine_dfb_image_objects.c b/legacy/evas/src/modules/engines/directfb/evas_engine_dfb_image_objects.c index 57a56b3fdb..68996d54f5 100644 --- a/legacy/evas/src/modules/engines/directfb/evas_engine_dfb_image_objects.c +++ b/legacy/evas/src/modules/engines/directfb/evas_engine_dfb_image_objects.c @@ -1,4 +1,4 @@ -#include "evas_engine_dfb.h" +~#include "evas_engine_dfb.h" #include #include @@ -42,7 +42,7 @@ evas_engine_directfb_image_load(void *data, char *file, char *key, int *error) *error = 0; if (!file) return NULL; - mod_time = evas_file_modified_time(file); +// mod_time = evas_file_modified_time(file); im = _dfb_image_find(file, key, mod_time); if (im) { @@ -84,7 +84,7 @@ evas_engine_directfb_image_load(void *data, char *file, char *key, int *error) if (img_desc.caps & DICAPS_ALPHACHANNEL) im->flags |= RGBA_IMAGE_HAS_ALPHA; - im->timestamp = mod_time; +// im->timestamp = mod_time; if (file) im->info.file = strdup(file); if (key) @@ -705,8 +705,10 @@ _dfb_image_store(RGBA_Image *im) if (im->info.file) l1 = strlen(im->info.file); l2 = 0; if (im->info.key) l2 = strlen(im->info.key); - snprintf(buf, sizeof(buf), "%llx", im->timestamp); - l3 = strlen(buf); +// snprintf(buf, sizeof(buf), "%llx", im->timestamp); +// l3 = strlen(buf); + buf[0] = 0; + l3 = 0; key = malloc(l1 + 3 + l2 + 3 + l3 +1); if (!key) return; key[0] = 0; @@ -733,8 +735,10 @@ _dfb_image_unstore(RGBA_Image *im) if (im->info.file) l1 = strlen(im->info.file); l2 = 0; if (im->info.key) l2 = strlen(im->info.key); - snprintf(buf, sizeof(buf), "%llx", im->timestamp); - l3 = strlen(buf); +// snprintf(buf, sizeof(buf), "%llx", im->timestamp); +// l3 = strlen(buf); + buf[0] = 0; + l3 = 0; key = malloc(l1 + 3 + l2 + 3 + l3 +1); if (!key) return; key[0] = 0; @@ -763,8 +767,10 @@ _dfb_image_find(const char *filename, const char *key, DATA64 timestamp) if (filename) l1 = strlen(filename); l2 = 0; if (key) l2 = strlen(key); - sprintf(buf, "%llx", timestamp); - l3 = strlen(buf); +// sprintf(buf, "%llx", timestamp); +// l3 = strlen(buf); + buf[0] = 0; + l3 = 0; str = malloc(l1 + 3 + l2 + 3 + l3 +1); if (!str) return NULL; str[0] = 0; @@ -793,9 +799,9 @@ _dfb_image_find(const char *filename, const char *key, DATA64 timestamp) ok++; if ((!key) && (!im->info.key)) ok++; - if (im->timestamp == timestamp) - ok++; - if (ok >= 3) return im; +// if (im->timestamp == timestamp) +// ok++; + if (ok >= 2) return im; } return NULL; }