enlightenment/src
Gustavo Sverzut Barbieri 619ed37fed eina_stringshare_replace() gets in!
I was replicating this code in many places, it should go into eina itself.

It's the right way to change strings that you don't know are
stringshared before, since it will first add a reference and then
remove, making it impossible to have references to go 0 and string
being released before adding new references, fixing the following
possible problem:

   x = eina_stringshare_add("x");
   replace(x, x);

   then:
   incorrect_replace(const char **b, const char *a) {
      eina_stringshare_del(*b); /* reference gets to 0 */
      eina_stringshare_add(a); /* BUG!!! */
      *b = a;
   }




SVN revision: 39903
2009-04-08 18:25:02 +00:00
..
bin eina_stringshare_replace() gets in! 2009-04-08 18:25:02 +00:00
modules add a cmd-line opt to skip format test... 2009-04-08 08:30:13 +00:00
preload * estickies, 2009-02-25 11:03:47 +00:00
.cvsignore Quiet! 2004-12-02 18:41:29 +00:00
Makefile.am speed up e17's login - reduce disk IO wait. 2006-10-22 10:03:59 +00:00