/* pp_hot.c
*
- * Copyright (c) 1991-1999, Larry Wall
+ * Copyright (c) 1991-2000, Larry Wall
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
#ifdef I_UNISTD
#include <unistd.h>
#endif
-#ifdef I_FCNTL
-#include <fcntl.h>
-#endif
-#ifdef I_SYS_FILE
-#include <sys/file.h>
-#endif
-
/* Hot code. */
char *s;
s = SvPV(TOPs,len);
sv_setpvn(TARG,s,len);
+ if (SvUTF8(TOPs) && !IN_BYTE)
+ SvUTF8_on(TARG);
SETTARG;
RETURN;
}
}
}
#endif
+ if (DO_UTF8(right))
+ sv_utf8_upgrade(TARG);
sv_catpvn(TARG,s,len);
+ if (!IN_BYTE) {
+ if (SvUTF8(right))
+ SvUTF8_on(TARG);
+ }
+ else if (!SvUTF8(right)) {
+ SvUTF8_off(TARG);
+ }
}
else
sv_setpvn(TARG,s,len); /* suppress warning */
rx->startp[0] = s - truebase;
rx->endp[0] = s - truebase + rx->minlen;
}
+ rx->nparens = rx->lastparen = 0; /* used by @- and @+ */
LEAVE_SCOPE(oldsave);
RETPUSHYES;
!(ob=(SV*)GvIO(iogv)))
{
if (!packname ||
- ((*(U8*)packname >= 0xc0 && IN_UTF8)
+ ((*(U8*)packname >= 0xc0 && DO_UTF8(sv))
? !isIDFIRST_utf8((U8*)packname)
: !isIDFIRST(*packname)
))