summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* [perl #103492] Give lvalue cx to (s)printf argsFather Chrysostomos2011-12-311-12/+15
| | | | | | | | | 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.
* [perl #107296] Document File::Glob’s default flagsFather Chrysostomos2011-12-301-2/+21
|
* Increase $File::Glob::VERSION to 1.16Father Chrysostomos2011-12-301-1/+1
|
* include a package POSIX::SigSetRicardo Signes2011-12-301-0/+8
| | | | | this is mostly for the benefit of the PAUSE indexer, as described in the code comment
* Provide the correct POSIX return value for POSIX::dup2() on Win32.Nicholas Clark2011-12-302-3/+11
| | | | | | | | | | 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.
* Convert POSIX::sleep to an XS wrapper for PerlProc_sleep().Nicholas Clark2011-12-303-3/+10
| | | | | | | | 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.
* Increase $POSIX::VERSION to 1.28Father Chrysostomos2011-12-291-1/+1
|
* Signal handlers must run before sigsuspend returnsLeon Timmermans2011-12-291-0/+4
| | | | | | | | | | 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.
* Update concise-xs.t for recent DD changeFather Chrysostomos2011-12-251-1/+2
|
* Supress warning in XS::APItest’s hash.tFather Chrysostomos2011-12-251-1/+3
|
* Don’t crash when writing to null hash elemFather Chrysostomos2011-12-241-0/+13
| | | | | | | 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.
* hv.c: Make newHVhv work on tied hashesFather Chrysostomos2011-12-242-0/+15
|
* *Now* increase $XS::APItest::VERSION to 0.35Father Chrysostomos2011-12-241-1/+1
| | | | without touching anything else.
* Use new feature-testing macrosFather Chrysostomos2011-12-241-8/+9
| | | | | | | Instead of using FEATURE_IS_ENABLED("say"), etc., now use FEATURE_SAY_IS_ENABLED instead. These new macros, in feature.h, also check feature bundle hints in PL_hints, so we can start using those hints. Two commits ago, feature.pm started setting them.
* Use only \w+ for internal feature namesFather Chrysostomos2011-12-241-8/+8
| | | | This will make it possible to create macros for each.
* Revert "Increase $XS::APItest::VERSION to 0.35"Father Chrysostomos2011-12-232-2/+2
| | | | | | | This reverts commit d54b00ad7f0e9db12ac11e897406b8888fd895bf. I didn’t mean to push that yet, and it was more than a version bump.
* Increase $XS::APItest::VERSION to 0.35Father Chrysostomos2011-12-232-2/+2
|
* Update concise-xs.t for B::Deparse’s new importsFather Chrysostomos2011-12-231-2/+2
|
* Increase $arybase::VERSION to 0.03Father Chrysostomos2011-12-221-1/+1
|
* Eek! I left some debug code in arybase.xsFather Chrysostomos2011-12-221-1/+0
|
* Teach B::Concise about OPpCONST_NOVERFather Chrysostomos2011-12-181-1/+2
|
* Stop tell($glob_copy) from clearing PL_last_in_gvFather Chrysostomos2011-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug is a side effect of rv2gv’s starting to return an incoercible mortal copy of a coercible glob in 5.14: $ perl5.12.4 -le 'open FH, "t/test.pl"; $fh=*FH; tell $fh; print tell' 0 $ perl5.14.0 -le 'open FH, "t/test.pl"; $fh=*FH; tell $fh; print tell' -1 In the first case, tell without arguments is returning the position of the filehandle. In the second case, tell with an explicit argument that happens to be a coercible glob (tell has an implicit rv2gv, so tell $fh is actu- ally tell *$fh) sets PL_last_in_gv to a mortal copy thereof, which is freed at the end of the statement, setting PL_last_in_gv to null. So there is no ‘last used’ handle by the time we get to the tell without arguments. This commit adds a new rv2gv flag that tells it not to copy the glob. By doing it unconditionally on the kidop, this allows tell(*$fh) to work the same way. Let’s hope nobody does tell(*{*$fh}), which will unset PL_last_in_gv because the inner * returns a mortal copy. This whole area is really icky. PL_last_in_gv should be refcounted, but that would cause handles to leak out of scope, breaking programs that rely on the auto-closing ‘feature’.
* Disable $[ under 5.16Father Chrysostomos2011-12-151-10/+27
| | | | | | | | | | | | | | | | | | | | | This adds the array_base feature to feature.pm Perl_feature_is_enabled has been modified to use PL_curcop, rather than PL_hintgv, so it can work with run-time hints as well. (PL_curcop holds the current state op at run time, and &PL_compiling at compile time, so it works for both.) The hints in $^H are not stored in the same place at compile time and run time, so the FEATURE_IS_ENABLED macro has been modified to check first whether PL_curop == &PL_compiling. Since array_base is on by default with no hint for it in %^H, it is a ‘negative’ feature, whose entry in %^H turns it off. feature.pm has been modified to support such negative features. The new FEATURE_IS_ENABLED_d can check whether such default features are enabled. This does make things less efficient, as every version declaration now loads feature.pm to disable all features (including turning off array_base, which entails adding an entry to %^H) before loading the new bundle. I have plans to make this more efficient.
* Remove the obsolete code for NO_EMBED from sdbm.hNicholas Clark2011-12-091-5/+1
| | | | | | Support for NO_EMBED was removed by commit 22c35a8c2392967 in 1998. Minitrue attempted to eliminate all mention of it in 2003 with commit a0a44e237c19cc2b, but missed this code in sdbm.h
* Fix ext/B/t/f_map.t failureFather Chrysostomos2011-12-071-1/+1
| | | | | Tiny typo on my part. Strangely, the tests passed for me before, so I probably made a mistake in trying to switch branches.
* Fix up ext/B/t for strict.pm changesFather Chrysostomos2011-12-076-136/+136
|
* Prepare Socket.pm for dual-lifePaul \"LeoNerd\" Evans2011-12-019-2394/+0
| | | | | | * Moved from ext/Socket to cpan/Socket * Currently declared as PEVANS/Socket-1.95.tar.gz - which is what it will eventually become
* Fixups for older Perl versions:Paul \"LeoNerd\" Evans2011-12-012-1/+5
| | | | | * Pass package and version to XSLoader::load to keep older perl versions happy * Older perls do not define croak_sv; #define a workaround for them
* Rewrite ext/Socket/t/Socket.t to use Test::More rather than manual printingPaul \"LeoNerd\" Evans2011-12-011-126/+97
|
* avoid double defining the POSIX::TCSANOW constant subTony Cook2011-11-282-3/+7
| | | | | | | | | On Win32 which has no native TCSANOW definition this would produce: Constant subroutine TCSANOW redefined at ../lib/POSIX.pm line -1. because the macro wasn't defined when building the unknown symbols table but was defined when building the defined symbols table.
* Optimise substr assignment in void contextFather Chrysostomos2011-11-262-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In void context we can optimise substr($foo, $bar, $baz) = $replacement; to something like substr($foo, $bar, $baz, $replacement); except that the execution order must be preserved. So what we actu- ally do is substr($replacement, $foo, $bar, $baz); with a flag to indicate that the replacement comes first. This means we can also optimise assignment to two-argument substr the same way. Although optimisations are not supposed to change behaviour, this one does. • It stops substr assignment from calling get-magic twice, which means the optimisation makes things less buggy than usual. • It causes the uninitialized warning (for an undefined first argu- ment) to mention the substr operator, as it did before the previous commit, rather than the assignment operator. I think that sort of detail is minor enough. I had to make the warning about clobbering references apply whenever substr does a replacement, and not only when used as an lvalue. So four-argument substr now emits that warning. I would consider that a bug fix, too. Also, if the numeric arguments to four-argument substr and the replacement string are undefined, the order of the uninitialized warn- ings is slightly different, but is consistent regardless of whether the optimisation is in effect. I believe this will make 95% of substr assignments run faster. So there is less incentive to use what I consider the less readable form (the four-argument form, which is not self-documenting). Since I like naïve benchmarks, here are Before and After: $ time ./miniperl -le 'do{$x="hello"; substr ($x,0,0) = 34;0}for 1..1000000' real 0m2.391s user 0m2.381s sys 0m0.005s $ time ./miniperl -le 'do{$x="hello"; substr ($x,0,0) = 34;0}for 1..1000000' real 0m0.936s user 0m0.927s sys 0m0.005s
* [perl #102586] version->new("version") SEGVsFather Chrysostomos2011-11-221-1/+1
| | | | | | This adds an ROK check after calling sv_derived_from, as the latter also works for class names. It is done after sv_derived_from, rather than before, as sv_derived_from calls get-magic.
* arybase.xs be more defensiveReini Urban2011-11-221-0/+4
| | | | | | There can be no other keys used with ab_ck_base but clang's static analyzer has a point in complaining about the missing default case. This is too fragile if any CHECK is added in BOOT.
* [RT #36079] Where sensible, replace consecutive single quotation marks with ↵jkeenan2011-11-222-11/+11
| | | | a double quotation mark.
* Version bumpsif-0.0602Father Chrysostomos2011-11-222-2/+2
|
* [RT #36079] Convert ` to '.jkeenan2011-11-227-23/+23
|
* [perl #80628] __SUB__Father Chrysostomos2011-11-222-4/+4
| | | | | After much alternation, altercation and alteration, __SUB__ is finally here.
* Make const redef warnings default in newXSFather Chrysostomos2011-11-212-11/+36
| | | | | | | | | | | | | | | | | | | | There is no reason why constant redefinition warnings should be default warnings for sub foo(){1}, but not for newCONSTSUB (which calls newXS, which triggers the warning). To make this work properly, I also had to import sv.c’s ‘are these const subs from the same SV originally?’ logic. Constants created with XS can have NULL for the SV (they return an empty list or &PL_sv_undef), which means sv.c’s logic will stop *this=\&that from warning if both this and that are such XS-created constants. newCONSTSUB needed to be consistent with that. It required tweaking a test I added a few commits ago, which arguably shouldn’t have warned the way it was written. As of this commit (and before it, too, come to think of it), newXS_len_flags’s calling convention is quite awful and would need to be throughly re-thunk before being made into an API, or probably sim- ply never made into an API.
* Make newXS redefinition warning respect UTF8Father Chrysostomos2011-11-211-1/+15
|
* Make newCONSTSUB use the right warning scope.Father Chrysostomos2011-11-211-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | newCONSTSUB uses the compile-time warning hints, instead of the run- time hints. This means that use warnings; BEGIN { no warnings; some_XS_function_that_calls_new_CONSTSUB(); } may trigger a redefinition warning, whereas it should be analogous to use warnings; BEGIN { no warnings; *foo = \&bar; } which does not warn. newCONSTSUB localises PL_curcop and sets it to &PL_compiling. When it does that, it needs to copy the hints over. Running tests inside eval is not reliable without a test count, so I added one.
* Merge remote-tracking branch 'p5p/smoke-me/gsoc-pod' into bleadRicardo Signes2011-11-2028-2109/+5242
|\
| * Dynamically create and delete testdir/test.lib/smoke-me/gsoc-podMarc Green2011-10-3111-66/+132
| | | | | | | | | | | | | | Due to the '.' in 'test.lib's name, t/filenames.t fails (because '.' is the path separator on VMS). To fix this, I create and delete the directory and its contents during each test that needs to access the directory. Said tests will be skipped if the directory cannot be created (e.g., on VMS).
| * Add Marc Green an an AUTHOR of Pod::HtmlMarc Green2011-10-311-1/+3
| |
| * Rename 2 tests, update files that reference themMarc Green2011-10-3114-25/+25
| | | | | | | | This fixes the podcheck error complaining about their filenames
| * Update version number (1.11 -> 1.12)Marc Green2011-10-311-1/+1
| |
| * Clean up some documentationMarc Green2011-10-311-6/+5
| |
| * Clean up test cases, rename a fewMarc Green2011-10-3121-86/+66
| |
| * Stop prepending $volume onto $cwd --podrootMarc Green2011-10-311-1/+1
| | | | | | | | $cwd already includes $volume
| * Unixify the whole path, not just $dir.$fileMarc Green2011-10-311-2/+1
| |
| * Fix crossref cross platform compatability issuesMarc Green2011-10-3110-65/+106
| | | | | | | | | | | | | | I added a whole bunch of "File::Spec"s and "File::Spec::Unix"s and I updated the test cases and test harness to be platform independent. I also updated some documentation in Pod::Html and removed some unneeded code.