efl/legacy/eina
Gustavo Sverzut Barbieri 2e9a9a9700 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
..
debian i found it is useless and cdbs is setting up prefix automatically. 2009-03-24 19:56:43 +00:00
doc * fix logic in efl_doxygen.m4 2009-02-01 20:21:56 +00:00
m4 * eina/m4/efl_pthread.m4, 2009-02-17 14:18:14 +00:00
src eina_stringshare_replace() gets in! 2009-04-08 18:25:02 +00:00
win32 set correctly the relative path of the extern directory, 2009-02-19 19:48:03 +00:00
.cvsignore Add benchmark support. 2008-08-06 15:54:56 +00:00
AUTHORS Faster sort from Alexandre Becoulet integrated by quarium inside eina. 2008-09-26 13:45:30 +00:00
COPYING License changes (BSD -> LGPL) 2008-08-06 18:12:57 +00:00
ChangeLog Adding turran work to unify EFL data types and functions. 2008-07-30 12:46:55 +00:00
INSTALL Update configure as we now need automake 1.10. 2008-09-29 09:46:27 +00:00
Makefile.am make eina able to do automake 1.9 and before... :) 2008-10-20 04:25:13 +00:00
NEWS Adding turran work to unify EFL data types and functions. 2008-07-30 12:46:55 +00:00
OLD-COPYING.PLAIN License changes (BSD -> LGPL) 2008-08-06 18:12:57 +00:00
README Let's see if the number of people asking what Eina is remains the same. 2008-12-30 15:38:11 +00:00
autogen.sh Use m4 directory. 2008-08-01 12:33:44 +00:00
configure.ac Fix compilation on OpenBSD (bug #250). Patch by eumel. 2009-03-22 13:40:28 +00:00
eina-0.pc.in Use includedir instead of prefix/include to install Eina headers. 2008-12-04 16:25:40 +00:00
eina.pc.in install headers in $prefix/include/eina-$VERSION_MAJOR to allow parralel 2008-07-30 13:16:09 +00:00
eina.spec.in Sat Oct 25 11:41:49 2008 Michael Jennings (mej) 2008-10-25 18:46:18 +00:00

README

Data types library (List, hash, etc)