| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
There are a number of files excluded using gitignore rules that are
included in the repository. This can lead to confusion if something
other than git tries to read the ignore files.
Add rules to the gitignore files so that these files won't be ignored.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The code was doing Safefree(in[i++]) in a loop,
but Safefree() is a macro which may evaluate its arg multiple times,
causing to i to get multipally incremented and thus skipping over some
items that need freeing.
This module is only used for build and test and isn't isn't installed,
so this fix is for the benefit of smokers rather than end users.
|
|
|
|
|
|
|
|
| |
Using vars pragma is discouraged and has been superseded by 'our' declarations
available in Perl v5.6.0 or later.
This commit is about replacing the usage of 'vars' pragma
by 'our' in 'ext' directory.
|
|
|
|
|
|
|
|
|
|
| |
Switch from two-argument form. Filehandle cloning is still done with the two
argument form for backward compatibility.
Committer: Get all porting tests to pass. Increment some $VERSIONs.
Run: ./perl -Ilib regen/mk_invlists.pl; ./perl -Ilib regen/regcharclass.pl
For: RT #130122
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
C++11 requires space between the end of a string literal and a macro, so
that a feature can unambiguously be added to the language. Starting in
g++ 6.2, the compiler emits a warning when there isn't a space
(presumably so that future versions can support C++11). Unfortunately
there are many such instances in the perl core. This commit fixes
those, including those in ext/, but individual commits will be used for
the other modules, those in dist/ and cpan/.
This commit also inserts space at the end of a macro before a string
literal, even though that is not deprecated, and removes useless ""
literals following a macro (instead of inserting a blank). The result
is easier to read, making the macro stand out, and be clearer as to the
intention.
Code and modules included with the Perl core need to be compilable using
C++. This is so that perl can be embedded in C++ programs. (Actually,
only the hdr files need to be so compilable, but it would be hard to
test that just the hdrs are compilable.) So we need to accommodate
changes to the C++ language.
|
|
|
|
|
|
|
|
|
| |
It turns out it's quite legal but then causes other mayhem, such
as confusing things that are looking for the "." directory (because
there is no such thing as a file without an extension so passing
an empty string to fopen creates ".;1" on disk).
Also make this test clean up its test files.
|
|
|
|
|
|
| |
These tests will either fail with harness, and randomly SEGV for
me, which is intentional since they are testing memory
corruption.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This test creates some file handles and dups them using XS that
exercises the T_OUT etc typemaps. When the dup filehandle is implicitly
closed on scope exit, it warns, since the close fails:
Warning: unable to close filehandle properly: Bad file descriptor
The close fails because the two file handles are sharing the same
underlying IoIFP/IoOFP and so the second of the two closes doesn't work.
Fix this by explicitly closing the handles.
(Note that until the previous commit that fixed a leak with these
typemaps, the warning wasn't coming until global destruction, since the
new GV was being leaked.)
|
|
|
|
|
|
| |
av_tindex is a more clearly named synonym for av_len, available starting
in v5.18. This changes the core uses to it, including modules in /ext,
which are not dual-lifed.
|
|
|
|
|
|
|
| |
These four core-only modules are about to be changed so that they call
av_tindex instead of av_len. There's no chance that any of the version
numbers will need to be reverted, as we think that bumping a single-life
module's version is harmless.
|
|
|
|
| |
This reverts commit 77ca9de6373481d905eed6af2904599353a658b3.
|
|
|
|
| |
This reverts commit 3407f4a92d7d9731d099e0290b68d7e983ff2497.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some XS modules expect to be able to modify strings passed in as char
pointers. Copy-on-write breaks that ability. So this commit makes
the T_PV typemap uncow mutable COWs when passing them.
const char* is now mapped to the new T_ROPV entry, to avoiding unnec-
essarily slowing it down.
Steffen Müller writes in <52912E9C.3030403@cpan.org> that the typemap
is not dual-lifed, so it is not necessary to make this 5.16-compati-
ble. However, I had already written the patch, and I think it is good
to keep it possible to drop this typemap into a CPAN distribution.
Any self-respecting C compiler should be able to optimise away the
extra SvIsCOW(t_pv_tmp_sv) == 1 check, so there is no slowdown as a
result of compatibility.
|
|
|
|
| |
xsubpp will give us a RETVAL var whether we use it not.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a problem with undefined values return from XSUBs not pro-
ducing such warnings.
The default typemap for XSUBs uses the target of the entersub call (in
the caller’s pad) to return the converted value, instead of having to
allocate a new SV for that.
So, for example, a function returning char* will cause that char* to
be assigned to the target via sv_setpv. Then the target is returned.
As a special case, NULL return from a char*-returning function will
produce an undef return value. This undef return value was not trig-
gering an uninitialized warning.
All targets are marked PADTMP, and anything marked PADTMP is exempt
from uninitialized warnings in some code paths, but not others.
This goes all the way back to 91bba347, which suppressed the warning
with only a hit at why (something to do with bitwise ops warning inap-
propriately). I think it was to make ~undef exempt. But a1afd104
stopped it from being exempt.
Only a few pieces of code were relying on this exemption, and it was
hiding bugs, too. The last few commits have addressed those, so kiss
this exemption good-bye!
pp_reverse had a workaround to force an uninit warning (since
1e21d011c), so remove the workaround to avoid a double uninit warning.
|
|
|
|
|
| |
I'm getting cmp_version.t failures from the recent T_BOOL changes. I
don't know why others don't seem to be.
|
|
|
|
|
|
|
|
|
|
| |
Previously OUTPUT argument parameters would replace ST(n) instead of
updating it, this meant that the caller's supplied value would not be
updated.
This change means that OUTPUT T_BOOL arguments called RETVAL won't be
handled correctly, but since the OUTPUT didn't work previously for
*any* case, this is a net improvement.
|
|
|
|
| |
also update one test so it actually fails
|
|
|
|
| |
[perl #115796] T_BOOL failure example
|
| |
|
|
|
|
| |
Trivial type issue in croak format
|
| |
|
|
|
|
| |
Unlike the existing tests, these new tests don't use RETVAL.
|
|
|
|
| |
Thanks, Karl, for spotting this sillyness!
|
|
|
|
|
|
|
| |
Apparently we were just missing the fact that T_IN and T_OUT are
pointers to PerlIO structs, not PerlIO structs themselves, which
kinda makes sense as you wouldn't normally have an entire struct
as a return value.
|
|
|
|
|
|
| |
This reverts commit 57e770c980de065ed94a4bc87d0b1f930c5ff3d0.
Next commit gets these tests working.
|
|
|
|
|
|
| |
No need to try to optimize the typemap tests.
But it's still a rather backwards and useless typemap in general.
|
|
|
|
|
|
|
| |
Craig reports that these blow up for his compiler. (Presumably on VMS)
I don't have the time to fix this properly and wouldn't be certain how
to go about it efficiently anyway, so this should at least prevent
breaking the build and test suite.
|
|
|
|
| |
At least in my new code.
|
|
|
|
|
|
|
|
|
|
| |
Sadly, the POD in Typemap.xs was not easily extractable into a POD file
at build time, so it now lives in a separate POD file from the start.
Makes keeping documentation and testing efforts in sync marginally
harder, but it's probably the right trade-off.
What's left to do is finding the right places in other POD files to
refer to this old/new documentation.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Thankfully, it's a one-liner now.
|
| |
|