Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pp_pack NEXT_UNI_VAL: Replace utf8n_to_uvchr with utf8_to_uv_flags #23085

Open
wants to merge 1 commit into
base: blead
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions pp_pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,16 +408,16 @@ STMT_START { \
} STMT_END

/* Only to be used inside a loop (see the break) */
#define NEXT_UNI_VAL(val, cur, str, end, utf8_flags) \
STMT_START { \
STRLEN retlen; \
if (str >= end) break; \
val = utf8n_to_uvchr((U8 *) str, end-str, &retlen, utf8_flags); \
if (retlen == (STRLEN) -1) { \
*cur = '\0'; \
croak("Malformed UTF-8 string in pack"); \
} \
str += retlen; \
#define NEXT_UNI_VAL(val, cur, str, end, utf8_flags) \
STMT_START { \
STRLEN retlen; \
if (str >= end) break; \
if (! utf8_to_uv_flags((U8 *) str, (U8 *) end, &val, &retlen, \
utf8_flags)) { \
*cur = '\0'; \
croak("Malformed UTF-8 string in pack"); \
} \
str += retlen; \
} STMT_END

static const char *_action( const tempsym_t* symptr )
Expand Down
Loading