This was introduced by
9df874cdaa2f196cc11fbd7b82a85690c243eb9f
in changing the name of some static functions. I didn't realize at the
time that the function was defined in embed.fnc, as none of the others
are, and it was always called with the S_ prefix form. Nor did I notice
the compiler warnings.
It turns out that the base name of this function is the same as a public
function, so I've renamed it to have prefix 'S_my_'.
ns |bool |need_utf8 |NN const char *pat|NN const char *patend
ns |char |first_symbol |NN const char *pat|NN const char *patend
sR |char * |sv_exp_grow |NN SV *sv|STRLEN needed
-snR |char * |bytes_to_uni |NN const U8 *start|STRLEN len|NN char *dest \
+snR |char * |my_bytes_to_utf8|NN const U8 *start|STRLEN len|NN char *dest \
|const bool needs_swap
#endif
#define opmethod_stash(a) S_opmethod_stash(aTHX_ a)
# endif
# if defined(PERL_IN_PP_PACK_C)
-#define bytes_to_uni S_bytes_to_uni
#define div128(a,b) S_div128(aTHX_ a,b)
#define first_symbol S_first_symbol
#define get_num(a,b) S_get_num(aTHX_ a,b)
#define is_an_int(a,b) S_is_an_int(aTHX_ a,b)
#define measure_struct(a) S_measure_struct(aTHX_ a)
#define mul128(a,b) S_mul128(aTHX_ a,b)
+#define my_bytes_to_utf8 S_my_bytes_to_utf8
#define need_utf8 S_need_utf8
#define next_symbol(a) S_next_symbol(aTHX_ a)
#define pack_rec(a,b,c,d) S_pack_rec(aTHX_ a,b,c,d)
}
STATIC char *
-S_bytes_to_utf8(const U8 *start, STRLEN len, char *dest, const bool needs_swap) {
- PERL_ARGS_ASSERT_BYTES_TO_UNI;
+S_my_bytes_to_utf8(const U8 *start, STRLEN len, char *dest, const bool needs_swap) {
+ PERL_ARGS_ASSERT_MY_BYTES_TO_UTF8;
if (UNLIKELY(needs_swap)) {
const U8 *p = start + len;
#define PUSH_BYTES(utf8, cur, buf, len, needs_swap) \
STMT_START { \
if (UNLIKELY(utf8)) \
- (cur) = S_bytes_to_utf8((U8 *) buf, len, (cur), needs_swap); \
+ (cur) = my_bytes_to_utf8((U8 *) buf, len, (cur), needs_swap); \
else { \
if (UNLIKELY(needs_swap)) \
S_reverse_copy((char *)(buf), cur, len); \
STMT_START { \
if (utf8) { \
const U8 au8 = (byte); \
- (s) = S_bytes_to_utf8(&au8, 1, (s), 0); \
+ (s) = my_bytes_to_utf8(&au8, 1, (s), 0);\
} else *(U8 *)(s)++ = (byte); \
} STMT_END
len+(endb-buffer)*UTF8_EXPAND);
end = start+SvLEN(cat);
}
- cur = S_bytes_to_utf8(buffer, endb-buffer, cur, 0);
+ cur = my_bytes_to_utf8(buffer, endb-buffer, cur, 0);
} else {
if (cur >= end) {
*cur = '\0';
#endif
#if defined(PERL_IN_PP_PACK_C)
-STATIC char * S_bytes_to_uni(const U8 *start, STRLEN len, char *dest, const bool needs_swap)
- __attribute__warn_unused_result__
- __attribute__nonnull__(1)
- __attribute__nonnull__(3);
-#define PERL_ARGS_ASSERT_BYTES_TO_UNI \
- assert(start); assert(dest)
-
STATIC int S_div128(pTHX_ SV *pnum, bool *done)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_MUL128 \
assert(sv)
+STATIC char * S_my_bytes_to_utf8(const U8 *start, STRLEN len, char *dest, const bool needs_swap)
+ __attribute__warn_unused_result__
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
+#define PERL_ARGS_ASSERT_MY_BYTES_TO_UTF8 \
+ assert(start); assert(dest)
+
STATIC bool S_need_utf8(const char *pat, const char *patend)
__attribute__nonnull__(1)
__attribute__nonnull__(2);