value = SvNV(sv);
/* Formats aren't yet marked for locales, so assume "yes". */
{
- RESTORE_NUMERIC_LOCAL();
+ STORE_NUMERIC_STANDARD_SET_LOCAL();
#if defined(USE_LONG_DOUBLE)
if (arg & 256) {
sprintf(t, "%#*.*" PERL_PRIfldbl,
* is repeatedly extended for every set of items. Is possible
* to do this without any stack extension or copying at all
* by maintaining a separate list over which the map iterates
- * (like foreach does). */
+ * (like foreach does). --gsar */
/* everything in the stack after the destination list moves
* towards the end the stack by the amount of room needed */
/* items to shift up (accounting for the moved source pointer) */
count = (SP - PL_stack_base) - (PL_markstack_ptr[-1] - 1);
+
+ /* This optimization is by Ben Tilly and it does
+ * things differently from what Sarathy (gsar)
+ * is describing. The downside of this optimization is
+ * that leaves "holes" (uninitialized and hopefully unused areas)
+ * to the Perl stack, but on the other hand this
+ * shouldn't be a problem. If Sarathy's idea gets
+ * implemented, this optimization should become
+ * irrelevant. --jhi */
+ if (shift < count)
+ shift = count; /* Avoid shifting too often --Ben Tilly */
EXTEND(SP,shift);
src = SP;
if (io) {
tryrsfp = IoIFP(io);
- if (IoTYPE(io) == '|') {
+ if (IoTYPE(io) == IoTYPE_PIPE) {
/* reading from a child process doesn't
nest -- when returning from reading
the inner module, the outer one is
else {
char *dir = SvPVx(dirsv, n_a);
#ifdef MACOS_TRADITIONAL
- /* We have ensured in incpush that library ends with ':' */
- Perl_sv_setpvf(aTHX_ namesv, "%s%s", dir, name+(name[0] == ':'));
+ char buf[256];
+ Perl_sv_setpvf(aTHX_ namesv, "%s%s", MacPerl_CanonDir(dir, buf), name+(name[0] == ':'));
#else
#ifdef VMS
char *unixdir;