char *s = SvPV(sv, len);
char *t;
+ PERL_ARGS_ASSERT_MUL128;
+
if (!strnEQ(s, "0000", 4)) { /* need to grow sv */
SV * const tmpNew = newSVpvs("0000000000");
S_bytes_to_uni(const U8 *start, STRLEN len, char *dest) {
const U8 * const end = start + len;
+ PERL_ARGS_ASSERT_BYTES_TO_UNI;
+
while (start < end) {
const UV uv = NATIVE_TO_ASCII(*start);
if (UNI_IS_INVARIANT(uv))
{
I32 total = 0;
+ PERL_ARGS_ASSERT_MEASURE_STRUCT;
+
while (next_symbol(symptr)) {
I32 len;
int size;
STATIC const char *
S_group_end(pTHX_ register const char *patptr, register const char *patend, char ender)
{
+ PERL_ARGS_ASSERT_GROUP_END;
+
while (patptr < patend) {
const char c = *patptr++;
S_get_num(pTHX_ register const char *patptr, I32 *lenptr )
{
I32 len = *patptr++ - '0';
+
+ PERL_ARGS_ASSERT_GET_NUM;
+
while (isDIGIT(*patptr)) {
if (len >= 0x7FFFFFFF/10)
Perl_croak(aTHX_ "pack/unpack repeat count overflow");
const char* patptr = symptr->patptr;
const char* const patend = symptr->patend;
+ PERL_ARGS_ASSERT_NEXT_SYMBOL;
+
symptr->flags &= ~FLAG_SLASH;
while (patptr < patend) {
need_utf8(const char *pat, const char *patend)
{
bool first = TRUE;
+
+ PERL_ARGS_ASSERT_NEED_UTF8;
+
while (pat < patend) {
if (pat[0] == '#') {
pat++;
STATIC char
first_symbol(const char *pat, const char *patend) {
+ PERL_ARGS_ASSERT_FIRST_SYMBOL;
+
while (pat < patend) {
if (pat[0] != '#') return pat[0];
pat++;
{
tempsym_t sym;
+ PERL_ARGS_ASSERT_UNPACKSTRING;
+
if (flags & FLAG_DO_UTF8) flags |= FLAG_WAS_UTF8;
else if (need_utf8(pat, patend)) {
/* We probably should try to avoid this in case a scalar context call
SV *sv;
const I32 start_sp_offset = SP - PL_stack_base;
howlen_t howlen;
-
I32 checksum = 0;
UV cuv = 0;
NV cdouble = 0.0;
bool explicit_length;
const bool unpack_only_one = (symptr->flags & FLAG_UNPACK_ONLY_ONE) != 0;
bool utf8 = (symptr->flags & FLAG_PARSE_UTF8) ? 1 : 0;
+
+ PERL_ARGS_ASSERT_UNPACK_REC;
+
symptr->strbeg = s - strbeg;
while (next_symbol(symptr)) {
bool skip = 1;
bool ignore = 0;
+ PERL_ARGS_ASSERT_IS_AN_INT;
+
while (*s) {
switch (*s) {
case ' ':
char *t = s;
int m = 0;
+ PERL_ARGS_ASSERT_DIV128;
+
*done = 1;
while (*t) {
const int i = m * 10 + (*t - '0');
dVAR;
tempsym_t sym;
+ PERL_ARGS_ASSERT_PACKLIST;
+
TEMPSYM_INIT(&sym, pat, patend, FLAG_PACK);
/* We're going to do changes through SvPVX(cat). Make sure it's valid.
const STRLEN cur = SvCUR(sv);
const STRLEN len = SvLEN(sv);
STRLEN extend;
+
+ PERL_ARGS_ASSERT_SV_EXP_GROW;
+
if (len - cur > needed) return SvPVX(sv);
extend = needed > len ? needed : len;
return SvGROW(sv, len+extend+1);
bool utf8 = (symptr->flags & FLAG_PARSE_UTF8) ? 1 : 0;
bool warn_utf8 = ckWARN(WARN_UTF8);
+ PERL_ARGS_ASSERT_PACK_REC;
+
if (symptr->level == 0 && found && symptr->code == 'U') {
marked_upgrade(aTHX_ cat, symptr);
symptr->flags |= FLAG_DO_UTF8;
any OS that needs it, or removed if and when VOS implements
posix-976 (suggestion to support mapping to infinity).
Paul.Green@stratus.com 02-04-02. */
+{
+extern const float _float_constants[];
if (anv > FLT_MAX)
afloat = _float_constants[0]; /* single prec. inf. */
else if (anv < -FLT_MAX)
afloat = _float_constants[0]; /* single prec. inf. */
else afloat = (float) anv;
+}
#else /* __VOS__ */
# if defined(VMS) && !defined(__IEEE_FP)
/* IEEE fp overflow shenanigans are unavailable on VAX and optional
for any OS that needs it, or removed if and when VOS
implements posix-976 (suggestion to support mapping to
infinity). Paul.Green@stratus.com 02-04-02. */
+{
+extern const double _double_constants[];
if (anv > DBL_MAX)
adouble = _double_constants[0]; /* double prec. inf. */
else if (anv < -DBL_MAX)
adouble = _double_constants[0]; /* double prec. inf. */
else adouble = (double) anv;
+}
#else /* __VOS__ */
# if defined(VMS) && !defined(__IEEE_FP)
/* IEEE fp overflow shenanigans are unavailable on VAX and optional