Enlightenment CVS committal
Author : sebastid
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_int_config_background.c e_thumb.c e_thumb.h
Log Message:
strdup -> evas_stringshare
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_background.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -3 -r1.56 -r1.57
--- e_int_config_background.c 8 Jul 2006 09:18:03 -0000 1.56
+++ e_int_config_background.c 28 Jul 2006 11:27:59 -0000 1.57
@@ -279,7 +279,6 @@
char *homedir;
const char *f;
- char *c;
int selnum = -1;
int i = 0;
@@ -299,7 +298,6 @@
i++;
f = e_theme_edje_file_get("base/theme/backgrounds", "desktop/background");
- c = strdup(f);
if (edje_object_file_set(o, f, "desktop/background"))
{
Evas_Object *ic = NULL;
@@ -396,7 +394,6 @@
}
evas_list_free(bg);
if (bg_dirs) e_path_dir_list_free(bg_dirs);
- free(c);
cfd->data = im;
e_widget_ilist_go(il);
if (selnum >= 0)
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_thumb.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -3 -r1.36 -r1.37
--- e_thumb.c 23 Jul 2006 21:19:04 -0000 1.36
+++ e_thumb.c 28 Jul 2006 11:27:59 -0000 1.37
@@ -9,15 +9,15 @@
{
int objid;
int w, h;
- char *file;
- char *key;
+ const char *file;
+ const char *key;
unsigned char queued : 1;
unsigned char busy : 1;
unsigned char done : 1;
};
/* local subsystem functions */
-static void _e_thumb_gen_begin(int objid, char *file, char *key, int w, int h);
+static void _e_thumb_gen_begin(int objid, const char *file, const char *key,
int w, int h);
static void _e_thumb_gen_end(int objid);
static void _e_thumb_del_hook(void *data, Evas *e, Evas_Object *obj, void
*event_info);
static void _e_thumb_hash_add(int objid, Evas_Object *obj);
@@ -90,16 +90,18 @@
}
EAPI void
-e_thumb_icon_file_set(Evas_Object *obj, char *file, char *key)
+e_thumb_icon_file_set(Evas_Object *obj, const char *file, const char *key)
{
E_Thumb *eth;
eth = evas_object_data_get(obj, "e_thumbdata");
if (!eth) return;
- E_FREE(eth->file);
- E_FREE(eth->key);
- if (file) eth->file = strdup(file);
- if (key) eth->key = strdup(key);
+ if (eth->file) evas_stringshare_del(eth->file);
+ eth->file = NULL;
+ if (eth->key) evas_stringshare_del(eth->key);
+ eth->key = NULL;
+ if (file) eth->file = evas_stringshare_add(file);
+ if (key) eth->key = evas_stringshare_add(key);
}
EAPI void
@@ -235,7 +237,7 @@
/* local subsystem functions */
static void
-_e_thumb_gen_begin(int objid, char *file, char *key, int w, int h)
+_e_thumb_gen_begin(int objid, const char *file, const char *key, int w, int h)
{
char *buf;
int l1, l2;
@@ -288,8 +290,8 @@
}
if (eth->queued)
_thumb_queue = evas_list_remove(_thumb_queue, eth);
- E_FREE(eth->file);
- E_FREE(eth->key);
+ if (eth->file) evas_stringshare_del(eth->file);
+ if (eth->key) evas_stringshare_del(eth->key);
free(eth);
}
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_thumb.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- e_thumb.h 8 Jul 2006 09:18:04 -0000 1.6
+++ e_thumb.h 28 Jul 2006 11:27:59 -0000 1.7
@@ -12,7 +12,7 @@
EAPI int e_thumb_shutdown(void);
EAPI Evas_Object *e_thumb_icon_add(Evas *evas);
-EAPI void e_thumb_icon_file_set(Evas_Object *obj, char *file,
char *key);
+EAPI void e_thumb_icon_file_set(Evas_Object *obj, const char
*file, const char *key);
EAPI void e_thumb_icon_size_set(Evas_Object *obj, int w, int
h);
EAPI void e_thumb_icon_begin(Evas_Object *obj);
EAPI void e_thumb_icon_end(Evas_Object *obj);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs