efl: backport r78215.

SVN revision: 78217
This commit is contained in:
Cedric BAIL 2012-10-19 01:51:07 +00:00
parent df8fb6d989
commit 7a132e9c08
2 changed files with 4 additions and 2 deletions

View File

@ -193,13 +193,15 @@ eina_unicode_escape(const Eina_Unicode *str)
EAPI Eina_Unicode EAPI Eina_Unicode
eina_unicode_utf8_get_next(const char *buf, int *iindex) eina_unicode_utf8_get_next(const char *buf, int *iindex)
{ {
int ind = *iindex; int ind;
Eina_Unicode r; Eina_Unicode r;
unsigned char d; unsigned char d;
EINA_SAFETY_ON_NULL_RETURN_VAL(buf, 0); EINA_SAFETY_ON_NULL_RETURN_VAL(buf, 0);
EINA_SAFETY_ON_NULL_RETURN_VAL(iindex, 0); EINA_SAFETY_ON_NULL_RETURN_VAL(iindex, 0);
ind = *iindex;
/* if this char is the null terminator, exit */ /* if this char is the null terminator, exit */
if ((d = buf[ind++]) == 0) return 0; if ((d = buf[ind++]) == 0) return 0;

View File

@ -128,7 +128,7 @@ EAPI Eina_Unicode *eina_unicode_escape(const Eina_Unicode *str) EINA_ARG_NONNULL
* *
* @param buf the string * @param buf the string
* @param iindex the index to look at and return by. * @param iindex the index to look at and return by.
* @return the codepoint found. * @return the codepoint found, 0 if @p buf or @p iindex are NULL
* @since 1.1.0 * @since 1.1.0
*/ */
EAPI Eina_Unicode eina_unicode_utf8_get_next(const char *buf, int *iindex) EINA_ARG_NONNULL(1, 2); EAPI Eina_Unicode eina_unicode_utf8_get_next(const char *buf, int *iindex) EINA_ARG_NONNULL(1, 2);