Yes, it accepts the len as strlen (real strlen) and then they add it
inside, but for the user, add_length gets a different len than you get back
from tmpstr_strlen().

:(

On Wed, Feb 4, 2015 at 12:33 PM, Daniel Hirt <daniel.h...@samsung.com>
wrote:

> Nah, it does "length += 1" beforehand (there's a comment in code),
> and just after that does "s->length = length";
>
> Agreeing with your suggestion, but let's keep this for 1.14+ and not a
> few days before release :)
>
> On 02/04/2015 02:28 PM, Tom Hacohen wrote:
> > On 04/02/15 12:11, Tom Hacohen wrote:
> >> Hey,
> >>
> >> If there are no objections, I'd like to deprecate eina_tmpstr_strlen()
> >> and create eina_tmpstr_len() that is unlike the former, not crazily
> >> confusing and error prone.
> >>
> >> With a name like *_strlen() you'd expect a function would behave like
> >> strlen(), alas, it behaves like "strlen() + 1". This is mind bogglingly
> >> inconsistent and super confusing. There's already at least one bug
> >> associated with this craziness (https://phab.enlightenment.org/D1929),
> >> but I'm sure there are more to come/be discovered.
> >>
> >> I suggest we deprecate it and add tmpstr_len() that behaves like
> >> strlen() and all of the other string len functions of the efl.
> >>
> >> Any objections/comments?
> >
> > OMFG, to make matters even worse, eina_tmpstr_add_length() actually
> > accepts the len as a strlen size (i.e without the nul) and
> > inconsistently with tmpstr_strlen().
> > :(
> >
> > --
> > Tom.
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Dive into the World of Parallel Programming. The Go Parallel Website,
> > sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> > hub for all things parallel software development, from weekly thought
> > leadership blogs to news, videos, case studies, tutorials and more. Take
> a
> > look and join the conversation now. http://goparallel.sourceforge.net/
> > _______________________________________________
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to