summaryrefslogtreecommitdiff
path: root/ext/XS-Typemap
Commit message (Collapse)AuthorAgeFilesLines
* test and fix using T_CVREF_REFCOUNT as an output parameterTony Cook2021-09-133-1/+16
|
* test and fix using T_AVREF_REFCOUNT as an output parameterTony Cook2021-09-133-1/+16
|
* test and fix using T_HVREF_REFCOUNT as an output parameterTony Cook2021-09-133-1/+16
|
* test and fix using T_SVREF_REFCOUNT as an output parameterTony Cook2021-09-133-1/+15
|
* bump $XS::Typemap::VERSIONTony Cook2021-09-131-1/+1
|
* test and fix using T_SV as an OUTPUT parameterTony Cook2021-09-133-1/+13
|
* add gitignore exclusions for files in gitGraham Knop2020-11-231-0/+2
| | | | | | | | 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.
* Typemap.xs: Convert to use av_count()Karl Williamson2020-08-192-2/+2
|
* bump Typemap.pm versionDavid Mitchell2019-04-271-1/+1
|
* Typemap.xs: avoid leakDavid Mitchell2019-04-271-3/+3
| | | | | | | | | | 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.
* Replace multiple 'use vars' by 'our' in extNicolas R2017-11-111-4/+2
| | | | | | | | 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 most open() calls to three-argument form.John Lightsey2016-12-231-1/+1
| | | | | | | | | | 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
* Change white space to avoid C++ deprecation warningKarl Williamson2016-11-182-2/+3
| | | | | | | | | | | | | | | | | | | | | | 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.
* Don't create zero-length filename on VMS in Typemap.tCraig A. Berry2015-07-091-1/+4
| | | | | | | | | 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.
* add test that fails for #124181 to Typemap.tDaniel Dragan2015-07-083-4/+29
| | | | | | These tests will either fail with harness, and randomly SEGV for me, which is intentional since they are testing memory corruption.
* XS-Typemap/t/Typemap.t: avoid close warningsDavid Mitchell2014-12-121-1/+7
| | | | | | | | | | | | | | | | | 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.)
* Change av_len calls to av_tindex for clarityKarl Williamson2014-02-201-1/+1
| | | | | | 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.
* Bump version numbersKarl Williamson2014-02-201-1/+1
| | | | | | | 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.
* Revert "Squash COWs in the char* typemap"Father Chrysostomos2013-11-273-35/+2
| | | | This reverts commit 77ca9de6373481d905eed6af2904599353a658b3.
* Revert "Increase $XS::Typemap::VERSION to 0.13"Father Chrysostomos2013-11-271-1/+1
| | | | This reverts commit 3407f4a92d7d9731d099e0290b68d7e983ff2497.
* Increase $XS::Typemap::VERSION to 0.13Father Chrysostomos2013-11-231-1/+1
|
* Squash COWs in the char* typemapFather Chrysostomos2013-11-233-2/+35
| | | | | | | | | | | | | | | | | 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.
* XS::Typemap: silence compiler warning.David Mitchell2013-11-182-1/+2
| | | | xsubpp will give us a RETVAL var whether we use it not.
* XS-Typemap tests: use parent instead of baseRicardo Signes2013-09-121-2/+2
|
* Increase XS::Typemap::VERSION to 0.11Father Chrysostomos2013-08-201-1/+1
|
* [perl #118693] Remove PADTMP exemption from uninit warningsFather Chrysostomos2013-08-203-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* XS-Typemap: bump versionKarl Williamson2012-12-221-1/+1
| | | | | I'm getting cmp_version.t failures from the recent T_BOOL changes. I don't know why others don't seem to be.
* when the output isn't RETVAL, update the SV instead of replacing itTony Cook2012-12-201-2/+0
| | | | | | | | | | 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.
* TODO the failing T_BOOL testsTony Cook2012-12-201-0/+2
| | | | also update one test so it actually fails
* T_BOOL failure exampleDaniel Dragan2012-12-203-1/+20
| | | | [perl #115796] T_BOOL failure example
* The T_BOOL_2 tests should have failed, rewrite and TODOTony Cook2012-12-201-4/+8
|
* Typemap.xs: fix warning under clangDavid Mitchell2012-12-141-1/+1
| | | | Trivial type issue in croak format
* Bump $XS::Typemap::VERSION after previous commit.Nicholas Clark2012-11-221-1/+1
|
* Add additional tests for T_BOOL typemapSteffen Mueller2012-11-223-1/+14
| | | | Unlike the existing tests, these new tests don't use RETVAL.
* XS::Typemap: Fix tests with -DusemorebitsSteffen Mueller2012-02-031-8/+31
| | | | Thanks, Karl, for spotting this sillyness!
* Resurrect PerlIO-related typemap tests.Craig A. Berry2012-02-021-2/+2
| | | | | | | 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.
* Revert "XS::Typemap: Disable PerlIO related typemap tests"Craig A. Berry2012-02-022-69/+57
| | | | | | This reverts commit 57e770c980de065ed94a4bc87d0b1f930c5ff3d0. Next commit gets these tests working.
* XS::Typemap: Silence pedantic compiler warningsSteffen Mueller2012-02-021-21/+31
| | | | | | No need to try to optimize the typemap tests. But it's still a rather backwards and useless typemap in general.
* XS::Typemap: Disable PerlIO related typemap testsSteffen Mueller2012-02-022-57/+69
| | | | | | | 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.
* XS::Typemap: Somewhat consistent indentationSteffen Mueller2012-02-011-43/+42
| | | | At least in my new code.
* Move typemap documentation to its own fileSteffen Mueller2012-02-011-580/+51
| | | | | | | | | | 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.
* XS::Typemap: Fix typo in docs, fix versionSteffen Mueller2012-02-011-2/+2
|
* XS::Typemap: Tests for T_IN/T_OUT typemapsSteffen Mueller2012-02-013-10/+64
|
* XS::Typemap: Tests for T_INOUT typemapSteffen Mueller2012-02-013-1/+22
|
* XS::Typemap: Tests for the T_PACKEDARRAY typemapSteffen Mueller2012-02-013-24/+180
|
* XS::Typemap: Tests for T_PACKEDSteffen Mueller2012-02-013-4/+91
|
* Document T_PACKEDARRAYSteffen Mueller2012-02-011-1/+15
|
* XS::Typemap: Document T_PACKEDSteffen Mueller2012-02-011-1/+32
|
* XS-Typemap: Document sharing mechanism for typemapsSteffen Mueller2012-02-011-0/+29
| | | | Thankfully, it's a one-liner now.
* Inline the XS-Typemap typemap fileSteffen Mueller2012-02-012-26/+31
|