summaryrefslogtreecommitdiff
path: root/mg.c
Commit message (Collapse)AuthorAgeFilesLines
* finish more implementing -DB vs. -DxChip Salzenberg2009-08-301-1/+2
|
* finish implementing -DB vs. -DxChip Salzenberg2009-08-301-1/+1
|
* Add clear magic to %^H so that the HE chain is reset when you empty it.Zefram2009-08-211-17/+29
| | | | This fixes [perl #68590] : %^H not lexical enough.
* Add test to make sure everything that outputs an exception or warning has a ↵James Mastros2009-06-271-1/+1
| | | | matching entry in perldiag (and fix it so that more of the existing ones do).
* Don't enqueue pending signals during global destructionLubomir Rintel2009-06-251-1/+2
| | | | | | Global destruction is not signal-safe. PL_psig_pend may already be gone when the signal handler is called (with destruct_level > 0). NULL it before freeing it to prevent a race condition.
* In Perl_magic_setsig(), silence a "possible loss of data" warning.Nicholas Clark2009-05-221-1/+2
|
* $? needs upgrade to PVLV when COMPLEX_STATUS is defined.Craig A. Berry2009-05-211-0/+2
|
* Merge Perl_magic_setisa() and Perl_magic_clearisa(), to remove duplicated logic.Nicholas Clark2009-05-211-25/+12
|
* In Perl_magic_setisa(), re-order two independant return early checks.Nicholas Clark2009-05-211-3/+3
|
* Cache the signal number or -1 in mg_private, to reduce calls to Perl_whichsig().Nicholas Clark2009-05-211-2/+9
| | | | | | It doesn't matter that 0 isn't cacheable, as the logic in Perl_magic_setsig() is such that we already can't "set" $SIG{ZERO}. Without this we make thousands of failing calls to Perl_whichsig() from Perl_magic_getsig() for "__WARN__".
* Perl_mg_clear() did not cope with the called magic deleting itself - fix this.Nicholas Clark2009-05-201-1/+4
| | | | Should all routines that iterate over the magic chain be hardened against this?
* In Perl_magic_setsig(), don't discard and then recreate the signal name SV.Nicholas Clark2009-05-201-3/+12
|
* Refactor Perl_magic_setsig() to remove duplication in the function exit logic.Nicholas Clark2009-05-201-36/+32
| | | | (With a lot of re-indenting, which vanishes with a whitespace ignoring diff)
* Merge the bulk of Perl_magic_clearsig() into Perl_magic_setsig().Nicholas Clark2009-05-201-73/+29
| | | | | | | | | | | | The comment at the top of Perl_magic_clearsig() said: XXX Some of this code was copied from Perl_magic_setsig. A little refactoring might be in order. and it was not wrong. Perl_magic_clearsig() is almost equivalent to Perl_magic_setsig() with the new signal handler as "DEFAULT". Externally, the sv parameter to Perl_magic_setsig() was Not NULL, so use a NULL sv to signal that the code is being called as Perl_magic_clearsig(), for the places where the behaviour of the two diverges.
* Perl_magic_clearsig() needs to remove magic, else delete $SIG{INT} returns undefNicholas Clark2009-05-201-1/+2
| | | | instead of the now-removed INT handler.
* In Perl_magic_clearsig(), only call LEAVE if we call ENTER.Nicholas Clark2009-05-201-0/+4
| | | | | (2d4fcd5e8be8d83efa948a259c49b56fc6c27ee5, reported and fixed by RT #20613, would ENTER but not LEAVE when HAS_SIGPROCMASK was not defined.)
* In Perl_magic_setsig(), clarify the scope of a block that interacts with #ifdef.Nicholas Clark2009-05-191-3/+2
|
* Remove all #ifdef MACOS_TRADITIONAL code in core and non-dual-life XS code.Nicholas Clark2009-04-271-22/+7
| | | | | | | | (MacOS support was removed from MakeMaker in 6.22, and merged to blead on 15th December 2004 with 5dca256ec738057dc331fb644a93eca44ad5fa14. After this point MacOS wouldn't even have been able to build the perl binary, because it would not have been able to build DynaLoader. If anyone wishes to resurrect MacOS, start by reversing this commit and the relevant part of that commit.)
* Update the documentation of get_hv() to note that it calls Perl_gv_fetchpv(),Nicholas Clark2009-01-211-1/+1
| | | | | and hence the 'create' argument is actually 'flags'. Fix code and documentation that used TRUE or FALSE to use 0 or GV_ADD.
* standardize save/restore of errno & vaxc$errnoChip Salzenberg2008-12-051-4/+4
| | | | | Message-ID: <20081127070141.GD17663@tytlal.topaz.cx> p4raw-id: //depot/perl@35018
* [perl #948] [PATCH] Allow tied $,Chip Salzenberg2008-11-141-12/+0
| | | | | Message-ID: <20081114084436.GJ5779@tytlal.topaz.cx> p4raw-id: //depot/perl@34831
* Re: [perl #60360] [PATCH] UPDATED: local $SIG{FOO} = sub {...}; sets signal ↵Chip Salzenberg2008-11-131-3/+3
| | | | | | | | | | | | handler to SIG_DFL Message-ID: <20081112234504.GI2062@tytlal.topaz.cx> Updated patch to retain source compatibility. Plus using the correct PERL_ARGS_ASSERT_SAVE_HELEM_FLAGS macro and running make regen. p4raw-id: //depot/perl@34829
* Re: [perl #60360] [PATCH] local $SIG{FOO} = sub {...}; sets signalChip Salzenberg2008-11-121-7/+13
| | | | | Message-ID: <20081111000040.GB19329@tytlal.topaz.cx> p4raw-id: //depot/perl@34819
* PATCH: Large omnibus patch to clean up the JRRT quotesTom Christiansen2008-11-021-2/+4
| | | | | | Message-ID: <25940.1225611819@chthon> Date: Sun, 02 Nov 2008 01:43:39 -0600 p4raw-id: //depot/perl@34698
* Explicitly specify some printf formats for constant strings.Rafael Garcia-Suarez2008-11-021-2/+2
| | | | | | This is mostly to silence gcc's warning, "format not a string literal and no format arguments". p4raw-id: //depot/perl@34694
* Add MUTABLE_GV(), and eliminate (V *) casts in *.c.Nicholas Clark2008-10-311-5/+5
| | | | | | Can't easily do gv.h, as GvGP() (at least) needs to split into two macros - one const for reading, one non-const for writing. p4raw-id: //depot/perl@34679
* Eliminate (SV *) casts from the rest of *.c, picking up one (further)Nicholas Clark2008-10-301-11/+11
| | | | | erroneous const in dump.c. p4raw-id: //depot/perl@34675
* Use pvs macros instead of pvn where possible.Marcus Holland-Moritz2008-10-291-3/+3
| | | p4raw-id: //depot/perl@34653
* Eliminate (AV *) casts in *.c.Nicholas Clark2008-10-291-7/+7
| | | p4raw-id: //depot/perl@34650
* Add MUTABLE_CV(), and eliminate (CV *) casts in *.c.Nicholas Clark2008-10-291-1/+1
| | | p4raw-id: //depot/perl@34647
* Every remaining (HV *) cast in *.cNicholas Clark2008-10-281-7/+7
| | | p4raw-id: //depot/perl@34629
* Bugs revealed by replacing (SV *) casts with something that doesn'tNicholas Clark2008-10-271-1/+1
| | | | | | | cast away const - AvFILL() doesn't guarantee that it won't modify the AV * passed to it. So the prototype for Perl_av_len() needs to change, and a const needs to go in Perl_magic_setarraylen(). p4raw-id: //depot/perl@34604
* Update copyright years.Nicholas Clark2008-10-251-2/+2
| | | p4raw-id: //depot/perl@34585
* Some more missing isGV_with_GP()sBen Morrow2008-06-281-1/+1
| | | | | Message-ID: <20080628160017.GA81579@osiris.mauzo.dyndns.org> p4raw-id: //depot/perl@34092
* Re: [perl #54566] assertion failure fiddling with @ISARafael Garcia-Suarez2008-05-211-2/+2
| | | | | | From: "Rafael Garcia-Suarez" <rgarciasuarez@gmail.com> Message-ID: <b77c1dce0805210542l164caf85k86a34feae25ca9a7@mail.gmail.com> p4raw-id: //depot/perl@33898
* Call SvMAGICAL_off in mg_freeBram2008-05-101-0/+1
| | | | | Message-ID: <20080505161856.pgz4pjga1w44ksk4@horde.wizbit.be> p4raw-id: //depot/perl@33815
* Inline the trivial S_raise_signal function in the perl signal handler.Gisle Aas2008-04-241-32/+14
| | | | | | | | | | This makes the code more readable and avoids the need for excuses for why the function is (still) named this way. It also effectively avoids segfaults observed with gcc-3.3 when the sibling-call optimization is used for invoking S_raise_signal() just before the signal handler returns. p4raw-id: //depot/perl@33741
* Drop #ifdefs that became empty in change #32012.Gisle Aas2008-04-241-4/+0
| | | | | p4raw-link: @32012 on //depot/perl: b6455c53c26be8a62e12a3f2a24a3a5086dd2c7b p4raw-id: //depot/perl@33739
* Fix for [perl #52074] Segfault on ISA push after symbol table deleteRafael Garcia-Suarez2008-04-151-2/+4
| | | | | | This restores the 5.8.8 behaviour. The deleted stash is not vivified again, hence the hierarchy remains broken. But there's no segfault. p4raw-id: //depot/perl@33684
* Define sv_insert() as a wrapper to sv_insert_flags(), and moveNicholas Clark2008-04-011-1/+2
| | | | | Perl_sv_insert() to mathoms.c p4raw-id: //depot/perl@33627
* apidoc mismatch for Perl_magic_clearhintVincent Pit2008-03-241-1/+1
| | | | | Message-ID: <47E80F52.4030805@profvince.com> p4raw-id: //depot/perl@33553
* Re: [PATCH] mg_magical() sometimes turns SvRMAGICAL on when it shouldn'tVincent Pit2008-03-101-10/+15
| | | | | Message-ID: <47ACD61B.6030501@profvince.com> p4raw-id: //depot/perl@33458
* assert() that every NN argument is not NULL. Otherwise we have theNicholas Clark2008-02-121-1/+133
| | | | | | | | | | | | ability to create landmines that will explode under someone in the future when they upgrade their compiler to one with better optimisation. We've already done this at least twice. (Yes, some of the assertions are after code that would already have SEGVd because it already deferences a pointer, but they are put in to make it easier to automate checking that each and every case is covered.) Add a tool, checkARGS_ASSERT.pl, to check that every case is covered. p4raw-id: //depot/perl@33291
* Fix bug whereby length on a tied scalar that returned a UTF-8 valueNicholas Clark2008-01-121-4/+7
| | | | | | | would not be correct the first time. (And for the more pathological case, would be incorrect if the UTF-8-ness of the returned value changed.) p4raw-id: //depot/perl@32968
* Re: [perl #49564] Re: MRO and av_clearRick Delaney2008-01-111-0/+23
| | | | | Message-ID: <20080109183655.GB11282@bort.ca> p4raw-id: //depot/perl@32948
* Re: SV leak?Vincent Pit2008-01-041-1/+1
| | | | | | | | Message-ID: <477D28BD.5060801@profvince.com> Mortalize SVs that are being pushed on the stack. Try to use specialized macros for pushing mortals. p4raw-id: //depot/perl@32822
* Add macros mPUSHs() and mXPUSHs() for pushing SVs on the stackMarcus Holland-Moritz2008-01-041-2/+2
| | | | | | and mortalizing them. Use these macros where possible. And also mX?PUSH[inpu] where possible. p4raw-id: //depot/perl@32821
* Add newSVpvs_flags() as a wrapper to newSVpvn_flags(), and reworkNicholas Clark2008-01-031-2/+4
| | | | | sv_2mortal(newSVpvs(...)) constructions to use it. p4raw-id: //depot/perl@32819
* Extend newSVpvn_flags() to also call sv_2mortal() if SVs_TEMP is set inNicholas Clark2008-01-031-5/+5
| | | | | | the flags. Move its implementation just ahead of sv_2mortal()'s for CPU cache locality. Refactor all code that can be to use this. p4raw-id: //depot/perl@32818
* Make struct regexp the body of SVt_REGEXP SVs, REGEXPs become SVs,Nicholas Clark2008-01-021-11/+0
| | | | | | and regexp reference counting is via the regular SV reference counting. This was not as easy at it looks. p4raw-id: //depot/perl@32804