Devel-XSCover

 view release on metacpan or  search on metacpan

t/fixtures/gcov/gcc/Spike.gcov.txt  view on Meta::CPAN

        -: 3398:    if (len > 1) {
        -: 3399:        char *null_at;
        -: 3400:        if (UNLIKELY((null_at = (char *)memchr(pv, 0, len-1)) != NULL)) {
        -: 3401:                SETERRNO(ENOENT, LIB_INVARG);
        -: 3402:                Perl_ck_warner(aTHX_ packWARN(WARN_SYSCALLS),
        -: 3403:                                   "Invalid \\0 character in %s for %s: %s\\0%s",
        -: 3404:                                   what, op_name, pv, null_at+1);
        -: 3405:                return FALSE;
        -: 3406:        }
        -: 3407:    }
        -: 3408:
        -: 3409:    return TRUE;
        -: 3410:}
        -: 3411:
        -: 3412:/*
        -: 3413:
        -: 3414:Return true if the supplied filename has a newline character
        -: 3415:immediately before the first (hopefully only) NUL.
        -: 3416:
        -: 3417:My original look at this incorrectly used the len from SvPV(), but
        -: 3418:that's incorrect, since we allow for a NUL in pv[len-1].
        -: 3419:
        -: 3420:So instead, strlen() and work from there.
        -: 3421:
        -: 3422:This allow for the user reading a filename, forgetting to chomp it,
        -: 3423:then calling:
        -: 3424:
        -: 3425:  open my $foo, "$file\0";
        -: 3426:
        -: 3427:*/
        -: 3428:
        -: 3429:#ifdef PERL_CORE
        -: 3430:
        -: 3431:PERL_STATIC_INLINE bool
        -: 3432:S_should_warn_nl(const char *pv)
        -: 3433:{
        -: 3434:    STRLEN len;
        -: 3435:
        -: 3436:    PERL_ARGS_ASSERT_SHOULD_WARN_NL;
        -: 3437:
        -: 3438:    len = strlen(pv);
        -: 3439:
        -: 3440:    return len > 0 && pv[len-1] == '\n';
        -: 3441:}
        -: 3442:
        -: 3443:#endif
        -: 3444:
        -: 3445:#if defined(PERL_IN_PP_C) || defined(PERL_IN_PP_HOT_C)
        -: 3446:
        -: 3447:PERL_STATIC_INLINE bool
        -: 3448:S_lossless_NV_to_IV(const NV nv, IV *ivp)
        -: 3449:{
        -: 3450:    /* This function determines if the input NV 'nv' may be converted without
        -: 3451:     * loss of data to an IV.  If not, it returns FALSE taking no other action.
        -: 3452:     * But if it is possible, it does the conversion, returning TRUE, and
        -: 3453:     * storing the converted result in '*ivp' */
        -: 3454:
        -: 3455:    PERL_ARGS_ASSERT_LOSSLESS_NV_TO_IV;
        -: 3456:
        -: 3457:#  if defined(NAN_COMPARE_BROKEN) && defined(Perl_isnan)
        -: 3458:    /* Normally any comparison with a NaN returns false; if we can't rely
        -: 3459:     * on that behaviour, check explicitly */
        -: 3460:    if (UNLIKELY(Perl_isnan(nv))) {
        -: 3461:        return FALSE;
        -: 3462:    }
        -: 3463:#  endif
        -: 3464:
        -: 3465:#  ifndef NV_PRESERVES_UV
        -: 3466:    STATIC_ASSERT_STMT(((UV)1 << NV_PRESERVES_UV_BITS) - 1 <= (UV)IV_MAX);
        -: 3467:#  endif
        -: 3468:
        -: 3469:    /* Written this way so that with an always-false NaN comparison we
        -: 3470:     * return false */
        -: 3471:    if (
        -: 3472:#  ifdef NV_PRESERVES_UV
        -: 3473:        LIKELY(nv >= (NV) IV_MIN) && LIKELY(nv < IV_MAX_P1) &&
        -: 3474:#  else
        -: 3475:        /* If the condition below is not satisfied, lower bits of nv's
        -: 3476:         * integral part is already lost and accurate conversion to integer
        -: 3477:         * is impossible.
        -: 3478:         * Note this should be consistent with S_sv_2iuv_common in sv.c. */
        -: 3479:        Perl_fabs(nv) < (NV) ((UV)1 << NV_PRESERVES_UV_BITS) &&
        -: 3480:#  endif
        -: 3481:        (IV) nv == nv) {
        -: 3482:        *ivp = (IV) nv;
        -: 3483:        return TRUE;
        -: 3484:    }
        -: 3485:    return FALSE;
        -: 3486:}
        -: 3487:
        -: 3488:#endif
        -: 3489:
        -: 3490:/* ------------------ pp.c, regcomp.c, toke.c, universal.c ------------ */
        -: 3491:
        -: 3492:#if defined(PERL_IN_PP_C) || defined(PERL_IN_REGCOMP_ANY) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_UNIVERSAL_C)
        -: 3493:
        -: 3494:#define MAX_CHARSET_NAME_LENGTH 2
        -: 3495:
        -: 3496:PERL_STATIC_INLINE const char *
        -: 3497:S_get_regex_charset_name(const U32 flags, STRLEN* const lenp)
        -: 3498:{
        -: 3499:    PERL_ARGS_ASSERT_GET_REGEX_CHARSET_NAME;
        -: 3500:
        -: 3501:    /* Returns a string that corresponds to the name of the regex character set
        -: 3502:     * given by 'flags', and *lenp is set the length of that string, which
        -: 3503:     * cannot exceed MAX_CHARSET_NAME_LENGTH characters */
        -: 3504:
        -: 3505:    *lenp = 1;
        -: 3506:    switch (get_regex_charset(flags)) {
        -: 3507:        case REGEX_DEPENDS_CHARSET: return DEPENDS_PAT_MODS;
        -: 3508:        case REGEX_LOCALE_CHARSET:  return LOCALE_PAT_MODS;
        -: 3509:        case REGEX_UNICODE_CHARSET: return UNICODE_PAT_MODS;
        -: 3510:        case REGEX_ASCII_RESTRICTED_CHARSET: return ASCII_RESTRICT_PAT_MODS;
        -: 3511:        case REGEX_ASCII_MORE_RESTRICTED_CHARSET:
        -: 3512:            *lenp = 2;
        -: 3513:            return ASCII_MORE_RESTRICT_PAT_MODS;
        -: 3514:    }
        -: 3515:    /* The NOT_REACHED; hides an assert() which has a rather complex
        -: 3516:     * definition in perl.h. */
        -: 3517:    NOT_REACHED; /* NOTREACHED */
        -: 3518:    return "?";	    /* Unknown */
        -: 3519:}
        -: 3520:
        -: 3521:#endif
        -: 3522:
        -: 3523:/*
        -: 3524:
        -: 3525:Return false if any get magic is on the SV other than taint magic.
        -: 3526:
        -: 3527:*/
        -: 3528:
        -: 3529:PERL_STATIC_INLINE bool



( run in 1.949 second using v1.01-cache-2.11-cpan-60884a8df76 )