On Tue, Oct 19, 2010 at 10:19 AM, Gustavo Sverzut Barbieri <barbi...@profusion.mobi> wrote: > This seems good, but would it handle the following cases? > > 1. > > void name_set(struct my_struct *p, const char *name) { > eina_stringshare_replace(&p->str, name); // could be a simple > eina_stringshare_add() as well > } > const char *name_get(const struct my_struct *p) { > return p->str; > } > Eina_Bool use_it(const struct my_struct *p) { > return strlen(p->str) % 2; // should be eina_stringshare_strlen() > } >
As I told, right now it will not handle this case. But it can be extended to do so. > > 2. > Eina_Bool use_it(const char *s) { > return strlen(x) % 2; // should not be eina_stringshare_strlen() > } > > use_it(name_get(p)); > use_it("hello"); If you meant "return strlen(s) % 2", yes, this would not be changed. Lucas De Marchi ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel