| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
| |
This allows their only caller, Storable::_store(), to be simplified, as $ret
will now have the correct values for its documented interface.
Also, replace C<$ret = undef> with C<undef $ret>, as the latter is equivalent,
but uses 1 fewer op.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The logic remains:
1: If the close fails, set $ret to undef, and attempt to unlink the file
2: If the eval set $@, attempt to unlink the file
3: If the unlink is attempted and fails, warn
However, the new code avoids using low-precedence or and a statement modifier,
both for flow control, in the same statement, which I certainly found confusing.
It also now avoids the implicit *three*-state logic for $ret, which previously
was attaching distinct meanings to true, false and undefined.
The new code has (some) flow control inside an if(), and enters a block (which
it seems that the old code strove hard to avoid - blocks are a small runtime
cost). However the block entry is only for the error case, so this should not
matter.
|
| |
|
|
|
|
|
|
| |
Hence they can have return type bool, which allows xsubpp to generate slightly
simpler (and smaller) code, and at run time avoids using a temporary for the
return value.
|
|
|
|
|
|
|
|
| |
Remove the static functions {,net}[mp]store(), which were trivial wrappers
around do_store(). Instead call do_store() directly, using the ALIAS index
as the flag. Less code.
On this platform, this reduces the object code by over 1K. (Over 1%)
|
| |
|
|
|
|
| |
This is to accomodate this new function in version.pm 0.85.
|
| |
|
| |
|
|
|
|
|
|
|
| |
The variables are neither documented nor exported, and nothing on CPAN uses
them. Hence there is no need to set them, which means that the return list from
Math::BigInt::Calc::_base_len() can be passed directly into FastCalc's XS
bootstrap.
|
|
|
|
|
| |
The BEGIN context of the code C<use>ing it will be early enough for the
subroutine assignments to take full effect.
|
|
|
|
|
|
| |
This avoids the need for a separate, special, one-shot _set_XS_BASE routine.
We take advantage of the fact that all arguments to XSLoader::load() are passed
on to the module's bootstrap routine.
|
|
|
|
|
| |
A search of CPAN shows that this private function is only used internally
between Math::BigInt::Calc, Math::BigInt::FastCalc and their test suites.
|
|
|
|
| |
This is to test for [perl #72062].
|
|
|
|
|
| |
Also remove the documentation of OPf_SPECIAL for OP_ENTERITER, as that was only
for 5.005 threads. Stop B::Deparse misinterpreting OPf_SPECIAL on OP_ENTERITER.
|
|
|
|
| |
These are only used under 5.005threads, which was removed in 5.10.
|
|
|
|
|
| |
But note - not all its tests are parsing, and some routines will fail at runtime
due to methods missing from older Bs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactoring of the grammar around statements. New production <barestmt>
encompasses a statement without label. It includes all statement types,
including declarations, with no unnecessary intermediate non-terminals.
It generates an op tree for the statement's content, with no leading
state op. The <fullstmt> production has just one rule, consisting of
optional label followed by <barestmt>. It puts a state op on the front
of the statement's content ops.
To support the regular statement op structure, the op sequence for for(;;)
loops no longer has a second state op between the initialisation and
the loop. Instead, the unstack op type is slightly adapted to achieve
the stack clearing without a state op.
The newFOROP() constructor function no longer generates a state op,
that now being the job of the <fullstmt> production. Consequently it
no longer takes a parameter stating what label is to go in the state op.
This brings it in line with the other op constructors.
|
|
|
|
|
|
|
| |
Previously these were using AV *. Whilst the code always was managing
references correctly, to work around the deficiency of the standard typemap
entry for AV * it had to mortalise the array it created, meaning that it was
creating 2 entries per call on the mortals stack, not 1.
|
|
|
|
| |
As the minimum perl version is 5.006, enable 'use warnings'.
|
|
|
|
|
|
|
| |
With the previous commit, both are now only used in one place.
No need to use sv_2mortal() on the reset of boolSV(), as both PL_sv_no and
PL_sv_yes are immortals. [And special-cased within the implementation of
sv_2mortal() - not only is it a no-op, it's a non-free no-op :-)]
|
|
|
|
|
|
|
|
| |
_one, _two and _ten are aliases to _zero
_is_odd is an alias of _is_even
_is_one, _is_two, _is_ten are aliases of _is_zero
On this system this reduces the object code size by about 4.5K (about 20%).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[DELTA]
2010-10-20
* Release 1.17
Test release of 1.16_01, versioning even deprecated Guts modules.
This prevents CPAN upgrade circular heck. Thanks BinGOs
Tested version fix for CPAN by BinGOs. Bump to stable version and release to public
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This commit makes B::Deparse support code like ‘our $ḟōō’. Currently,
an ‘our’ variable whose name is an octet sequence that does not consist
of (\w|::)+ can only be a UTF8 variable name.
When the pad is made to support UTF8 properly, this may need to
be changed.
|
|
|
|
|
|
|
|
| |
DATA handle is untainted on startup, but as we close and reopen it it
gets the taint flag. It's safe to untaint it though, since we still hold
the file descriptor open and don't reassign it to another file.
This was probably broken by changeset 29606, (c96b2385 in perl git).
|
| |
|
| |
|
|
|
|
| |
just in case 5.13.6 is released before the next CPAN release of DD.
|
| |
|
|
|
|
|
|
| |
This is necessary on Exherbo, at least, because of the network
sandboxing that is done by 'sydbox'. And, in general, tests shouldn't be
listening on all interfaces.
|
|
|
|
|
| |
In the case of dynamic linking, it's already using caller to get a filename, so
this isn't usually any extra work.
|
| |
|
|
|
|
| |
as this may change before 5.14.
|
|
|
|
|
| |
Moves the various scripts that are called by regen.pl to a subdirectory
to reduce clutter.
|
|
|
|
| |
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
|
|
|
|
|
|
|
|
|
|
|
| |
perl_construct() sets the current interpreter context, and ends in an ENTER.
Hence threads::shared needs to restore the interpreter context, and balance the
ENTER with a leave. Previously it was using its PERL_SET_CONTEXT() macro,
which also contains a FREETMPS. However, this FREETMPS is erroneous in this
specific context, as it does not have a balancing SAVETMPS. Hence calling
SAVETMPS here would run it in the context of the shared interpreter, but it
would (attempt to) free up temporaries created in the context of the parent
interpreter.
|
| |
|
|
|
|
| |
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
|
|
|
|
|
| |
Document that all arguments are passed on to the module's bootstrap function,
and the behaviour of the bootstrap function in modules built by xsubpp.
|
|
|
|
|
|
|
|
|
| |
Previously the full pre 5.6 XSLoader::bootstrap_inherit emulation code was
always declared, but only used with a *runtime* check of Perl version.
However, it appears to be part of the implicit API of XSLoader that
XSLoader::bootstrap_inherit exists, so keep a stub implementation post 5.6
the commit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
aka [rt.cpan.org #55767] segfault on sqrt(2) with bigrat
The problem seems to be in &Math::BigInt::objectify. It doesn’t try to
convert the number object into the right class if $upgrade is defined.
The attached patch changes it to make sure it belongs to the calling
class or to the $upgrade class.
Here is a ‘one’-liner to trigger the same bug without bigrat:
perl -Ilib -MMath::BigInt=upgrade,Math::BigFloat \
-MMath::BigFloat=upgrade,Math::BigMouse -le \
'@Math::BigMouse::ISA = Math::BigFloat; print sqrt Math::BigInt->new(2)'
|
|
|
|
| |
(and make it pass, too)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do it in scope only so die messages fall through when desired.
Previously, there was test code to make sure $@ was not modified when
maketext is called, but if the caller wraps maketext in an eval, then
it's going to be modified anyways to '' at the least. If the caller
does not wrap a maketext call in an eval and maketext dies, then hiding
the $@ simply confuses the person debugging as to what went wrong.
We do however backup/restore $@ so that it does not break any code that
looks might use $@ after a successful call to maketext.
eval {...}
$lm->maketext($@);
do_something_else($@);
In the above example, $@ would be the same when passed to do_something_else
|
| |
|
|
|
|
| |
Run `cd`, rather than `cmd /c cd`, in miniperl on Windows.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch imports the changes which are on CPAN but not already
pulled into blead for Locale::Maketext.
1. New test file t/70_fail_auto.t - Test for CPAN RT #25877
2. Fix for RT25877 (Logic fix tested in 70_fail_auto.t)
3. Convert t/30_local.t to Test::More (the other files were already
done in blead. This one was missed.
4. Add a cookbook pod file.
5. Changelog entries which were on CPAN but not in blead.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change:
1. loads I18N::LangTags::Detect in BEGIN rather than whenever _ambient_langprefs is called
2. Removes the version number requirement for I18N::LangTags. Detect didn't come around until 0.31 so a dep on 0.30 is unnecessary.
This will assure any load issues with I18N::LangTags::Detect happen at BEGIN, not randomly somewhere in the program.
This does increase the dependency on I18N::LangTags from 0.30 to 0.31, but the release dates are as follows, so I don't think it's a big deal:
0.30 - 2004-03-30 Sean M. Burke sburke@cpan.org
0.31 - 2004-06-17 Sean M. Burke sburke@cpan.org
|