/* check for duplicate declaration */
pad_check_dup(name,
- PL_in_my == KEY_our,
+ (bool)(PL_in_my == KEY_our),
(PL_curstash ? PL_curstash : PL_defstash)
);
o->op_type = OP_RV2AV;
o->op_ppaddr = PL_ppaddr[OP_RV2AV];
+ o->op_flags &= ~OPf_REF; /* treat \(1..2) like an ordinary list */
+ o->op_flags |= OPf_PARENS; /* and flatten \(1..2,3) */
o->op_seq = 0; /* needs to be revisited in peep() */
curop = ((UNOP*)o)->op_first;
((UNOP*)o)->op_first = newSVOP(OP_CONST, 0, SvREFCNT_inc(*PL_stack_sp--));
U8* tend = t + tlen;
U8* rend = r + rlen;
STRLEN ulen;
- U32 tfirst = 1;
- U32 tlast = 0;
- I32 tdiff;
- U32 rfirst = 1;
- U32 rlast = 0;
- I32 rdiff;
- I32 diff;
+ UV tfirst = 1;
+ UV tlast = 0;
+ IV tdiff;
+ UV rfirst = 1;
+ UV rlast = 0;
+ IV rdiff;
+ IV diff;
I32 none = 0;
U32 max = 0;
I32 bits;
assert(!loop->op_next);
/* for my $x () sets OPpLVAL_INTRO;
* for our $x () sets OPpOUR_INTRO; both only used by Deparse.pm */
- loop->op_private = iterpflags;
+ loop->op_private = (U8)iterpflags;
#ifdef PL_OP_SLAB_ALLOC
{
LOOP *tmp;
ST(0) = (SV*)XSANY.any_ptr;
XSRETURN(1);
}
-
-PerlIO*
-Perl_my_tmpfp(pTHX)
-{
- PerlIO *f = NULL;
- int fd = -1;
-#ifdef PERL_EXTERNAL_GLOB
- /* File::Temp pulls in Fcntl, which may not be available with
- * e.g. miniperl, use mkstemp() or stdio tmpfile() instead. */
-# if defined(WIN32) || !defined(HAS_MKSTEMP)
- FILE *stdio = PerlSIO_tmpfile();
- if (stdio) {
- if ((f = PerlIO_push(aTHX_(PerlIO_allocate(aTHX)),
- &PerlIO_stdio, "w+", Nullsv))) {
- PerlIOStdio *s = PerlIOSelf(f, PerlIOStdio);
- s->stdio = stdio;
- }
- }
-# else /* !WIN32 && HAS_MKSTEMP */
- SV *sv = newSVpv("/tmp/PerlIO_XXXXXX", 0);
- fd = mkstemp(SvPVX(sv));
- if (fd >= 0) {
- f = PerlIO_fdopen(fd, "w+");
- if (f) {
- PerlLIO_unlink(SvPVX(sv));
- SvREFCNT_dec(sv);
- }
- }
-# endif /* WIN32 || !HAS_MKSTEMP */
-#else
- /* We have internal glob, which probably also means that we
- * can also use File::Temp (which uses Fcntl) with impunity. */
- GV *gv = gv_fetchpv("File::Temp::tempfile", FALSE, SVt_PVCV);
-
- if (!gv) {
- ENTER;
- Perl_load_module(aTHX_ PERL_LOADMOD_NOIMPORT,
- newSVpvn("File::Temp", 10), Nullsv, Nullsv, Nullsv);
- gv = gv_fetchpv("File::Temp::tempfile", FALSE, SVt_PVCV);
- GvIMPORTED_CV_on(gv);
- LEAVE;
- }
- if (gv && GvCV(gv)) {
- dSP;
- ENTER;
- SAVETMPS;
- PUSHMARK(SP);
- PUTBACK;
- if (call_sv((SV*)GvCV(gv), G_SCALAR)) {
- GV *gv = (GV*)SvRV(newSVsv(*PL_stack_sp--));
- IO *io = gv ? GvIO(gv) : 0;
- fd = io ? PerlIO_fileno(IoIFP(io)) : -1;
- }
- SPAGAIN;
- PUTBACK;
- FREETMPS;
- LEAVE;
- }
- if (fd >= 0)
- f = PerlIO_fdopen(fd, "w+");
-#endif
-
- return f;
-}
-