| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
| |
It was setting this even on magical variables, causing stringification
not to bother calling FETCH, because the POK flag means ‘yes, I’m a
bonified [sic] string, with nothing funny going on’.
|
| |
|
|
|
|
|
| |
Instead of just doing SvPV on something that is not a PV, SvPVbyte
should actually do what it is advertised as doing.
|
|
|
|
| |
It didn’t until the previous commit.
|
|
|
|
|
|
|
|
|
|
| |
In shouldn’t destroy globs or references passed to it, or try to
coerce them if they are read-only or incoercible.
I added tests for SvPVbyte at the same time, even though it was not
exhibiting the same problems, as sv_utf8_downgrade doesn’t try to
coerce anything. (SvPVbyte has its own set of bugs, which I hope to
fix in fifthcoming commits.)
|
|
|
|
| |
so it can be changed without one having to search for it.
|
| |
|
|
|
|
|
| |
(actually just list in; you have to know the internals
to use these things anyway)
|
|
|
|
| |
following commit ffa23acf6.
|
|
|
|
| |
This gives a small reduction in both source lines and object code size.
|
|
|
|
|
|
| |
On systems without MAXPATHLEN or PATH_MAX defined (GNU/Hurd is an example
of such a system), set MAXPATHLEN to 4096 rather than 1024; this increase
creates parity with Linux.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Along with the simple_casefolding and full_casefolding features.
fc() stands for foldcase, a sort of pseudo case (like lowercase),
which is used to implement Unicode casefolding. It maps a string
to a form where all case differences are erased, so it's a
locale-independent way of checking if two strings are the same,
regardless of case.
This functionality was, and still is, available through the
regular expression engine -- /i matches would use casefolding
internally. The fc keyword merely exposes this for easier access.
Previously, one could attempt to case-insensitively test two strings
for equality by doing
lc($a) eq lc($b)
But that might get you wrong results, for example in the case of
\x{DF}, LATIN SMALL LETTER SHARP S.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Up till now, -t was popping too much off the stack when stacked with
other filetest operators.
Since the special use of _ doesn’t apply to -t, we cannot simply have
it use _ when stacked, but instead we pass the argument down from the
previous op.
To facilitate this, the whole stacked mechanism has to change.
As before, in an expression like -r -w -x, -x and -w are flagged
as ‘stacking’ ops (followed by another filetest), and -w and -r are
flagged as stacked (preceded by another filetest).
Stacking filetest ops no longer return a false value to the next op
when a test fails, and stacked ops no longer check the truth of the
value on the stack to determine whether to return early (if it’s
false).
The argument to the first filetest is now passed from one op to
another. This is similar to the mechanism that overloaded objects
were already using. Now it applies to any argument.
Since it could be false, we cannot rely on the boolean value of the
stack item. So, stacking ops, when they return false, now traverse
the ->op_next pointers and find the op after the last stacked op.
That op is returned to the runloop. This short-circuiting is proba-
bly faster than calling every subsequent op (a separate function call
for each).
Filetest ops other than -t continue to use the last stat buffer when
stacked, so the argument on the stack is ignored.
But if the op is preceded by nothing other than -t (where preceded
means on the right, since the ops are evaluated right-to-left), it
*does* use the argument on the stack, since -t has not set the last
stat buffer.
The new OPpFT_AFTER_t flag indicates that a stacked op is preceded by
nothing other than -t.
In ‘-e -t foo’, the -e gets the flag, but not in ‘-e -t -r foo’,
because -r will have saved the stat buffer, so -e can just use that.
|
| |
|
| |
|
|
|
|
| |
Threaded perl added this field with 5.15.4 for utf8 stashes.
|
|
|
|
| |
IoFLAGS are not defined in perliol.h
|
|
|
|
| |
using Eric Brine’s function.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
add pod to B::IO Methods and IoTYPE.
fix IsSTD.
|
|
|
|
|
|
|
|
|
| |
long is only 32-bits on x64 Win32, but time_t is 64-bits. This was warning:
POSIX.xs(1777) : warning C4244: 'initializing' : conversion from 'time_t' to 'const long', possible loss of data
The check against (time_t)-1 is the approved check from ANSI C 89 and
99.
|
|
|
|
|
|
|
|
| |
Pod::Html attempts to search for the contents to see if they are a suffix
of any entry in an existing list, using a regular expression.
Previously the contents were interpolated directly into a regex, which
meant that if they happened to be syntactically invalid regular expression
syntax, Pod::Html aborted with a runtime error.
|
|
|
|
|
|
|
|
|
|
| |
The long deprecated --netscape flag was removed in commit 27b29ec338b08496.
This was originally added to control use of Netscape specific HTML
extensions, , but became a no-op when that functionality was removed.
--libpods was removed in commit 3b49d8d9ac841d8e.
However neither commit removed use of these flags by callers to Pod::Html,
notably in installhtml and the Makefiles that invoke it. Hence this commit.
|
|
|
|
|
|
|
| |
It used to crash if the PVX buffer happened to be null.
If the PVX buffer happened to be left over from before,
it would use that instead of the numeric value, even for
!SvPOK scalars.
|
|
|
|
| |
Otherwise, it won’t work with an overloaded object.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise we get assertion failures.
In fact, since seeking might be just for reading, we can’t coerce and
SvGROW either.
In fact, since the scalar might be modified between seek and write,
there is no *point* in SvGROW during seek, even for SvPOK scalars.
PerlIO::scalar assumes in too many places that the scalar it is using
is its own private scalar that nothing else can modify. Nothing could
be farther from the truth.
This commit moves the zero-fill that usually happens when seeking past
the end from seek to write. During a write, if the current position
is past the end of the string, the intervening bytes are zero-filled
at that point, since the seek hasn’t done it.
|
| |
|
|
|
|
|
|
|
|
|
| |
Or potential lvalue context, like function calls.
The %n format code’s existence renders these two very much like func-
tion calls, as they can modify their arguments.
This allows sprintf("...%n", substr ...) to work.
|
| |
|
| |
|
|
|
|
|
| |
this is mostly for the benefit of the PAUSE indexer, as described
in the code comment
|
|
|
|
|
|
|
|
|
|
| |
Microsoft, in their wisdom, chose to ignore the POSIX spec when implementing
their dup2(), and have theirs return 0 on success, instead of the file
descriptor. It seems that no other vendor is this, um, "special", so code
the exception directly, as we don't run Configure on Win32, so there's little
point probing for this.
This resolves RT #98912.
|
|
|
|
|
|
|
|
| |
Previously it was a Perl wrapper for CORE::sleep, converting CORE::sleep's
return value of elapsed time slept into the POSIX return value of seconds
remaining. However, that approach could sometimes return a negative result
if CORE::sleep had slept for more than a second longer than the requested
time.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The whole point of sigsuspend and pause is to wait until a signal has
arrived, and then return *after* it has been triggered. Currently
delayed/"safe" signals prevent that from happening, which might cause
race conditions.
This patch prevents that (as far as possible) by running the signal
handlers ASAP.
|
| |
|
| |
|
|
|
|
|
|
|
| |
It’s possible for XS code to create hash entries with null values.
pp_helem and pp_slice were not taking that into account. In fact,
the core produces such hash entries, but they are rarely visible from
Perl. It’s good to check for them anyway.
|
| |
|