On Fri, 2010-07-30 at 11:15 +0800, Brett Nash wrote:
> Can I just point out these are not really semantically equivalent.
> 
> Also neither evas_common_econding_unicode_strlen (as committed) or
> evas_common_encoding_strlen seem to exist.  I assume you meant 
> eina_unicode_strlen()?
> 
> And can I ask why you removed the word 'portable' from the comment?
> (Which tells me you took the time to read the code...)
> 

Sorry for the late response.

I don't remember editing the comment, so I can only assume that svn
merged it automatically.

Regarding the code, it's *not* equivalent, eina_unicode_strlen(text)
returns the strings length in 'int's not chars, that is strlen / 4.
Furthermore, unicode text can (and usually does) include null bytes
inside the string (it's terminated by a 4 bytes null) which means that
memchr will probably find the wrong null.

Regarding the portable - again, sorry, I don't remember doing that
(although I do remember reading the comment).
Regarding the equivalence, as stated, they are not.
Regarding evas_common_encoding_unicode_strlen, yes, sorry about it,
that's my bad, I gut used to writing "evas_common_encoding_..." and
since (as stated in my commit mail) I can't/don't test all of the
possible compilation flags, I just missed that. (Yes, I meant
eina_unicode_strlen).

In other words, yeah, my bad, sorry :P

--
Tom.


------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to