From: Vincent Pit Date: Sun, 29 Jun 2008 16:24:52 +0000 (+0200) Subject: Importing Variable-Magic-0.17.tar.gz X-Git-Tag: v0.17^0 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FVariable-Magic.git;a=commitdiff_plain;h=f288418c4b000299d393dc9d84f36985acb16954 Importing Variable-Magic-0.17.tar.gz --- diff --git a/Changes b/Changes index 659b4c4..c74a5dc 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for Variable-Magic +0.17 2008-05-11 09:05 UTC + + Fix : 5.8.4 and lower don't have mPUSHi. Gah. Yeah, I know, I should + use Devel::PPPort. + 0.16 2008-05-10 22:05 UTC + Add : The samples/copy.pl script. + Chg : The sv_magical() + vmg_mg_magical() combo was simplified into diff --git a/META.yml b/META.yml index 9741746..ec669c9 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name: Variable-Magic -version: 0.16 +version: 0.17 abstract: Associate user-defined magic to variables from Perl. license: perl author: diff --git a/Magic.xs b/Magic.xs index c1e582f..61f8f1f 100644 --- a/Magic.xs +++ b/Magic.xs @@ -40,6 +40,10 @@ # define SvMAGIC_set(sv, val) (SvMAGIC(sv) = (val)) #endif +#ifndef mPUSHi +# define mPUSHi(I) PUSHs(sv_2mortal(newSViv(I))) +#endif + #ifndef dMY_CXT # define MY_CXT vmg_globaldata # define dMY_CXT @@ -90,7 +94,7 @@ #if VMG_UVAR -/* Bug-free mg_magical - see http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2008-01/msg00036.html, but specialized to our needs. */ +/* Bug-free mg_magical - see http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2008-01/msg00036.html - but specialized to our needs. */ STATIC void vmg_sv_magicuvar(pTHX_ SV *sv, const char *uf, I32 len) { #define vmg_sv_magicuvar(S, U, L) vmg_sv_magicuvar(aTHX_ (S), (U), (L)) const MAGIC* mg; @@ -102,22 +106,12 @@ STATIC void vmg_sv_magicuvar(pTHX_ SV *sv, const char *uf, I32 len) { do { const MGVTBL* const vtbl = mg->mg_virtual; if (vtbl) { -/* - if (vtbl->svt_get && !(mg->mg_flags & MGf_GSKIP)) - SvGMAGICAL_on(sv); - if (vtbl->svt_set) - SvSMAGICAL_on(sv); -*/ if (vtbl->svt_clear) { SvRMAGICAL_on(sv); break; } } } while ((mg = mg->mg_moremagic)); -/* - if (!(SvFLAGS(sv) & (SVs_GMG|SVs_SMG))) - SvRMAGICAL_on(sv); -*/ } } diff --git a/README b/README index 55fe265..ab7c956 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ NAME Variable::Magic - Associate user-defined magic to variables from Perl. VERSION - Version 0.16 + Version 0.17 SYNOPSIS use Variable::Magic qw/wizard cast dispell/; diff --git a/lib/Variable/Magic.pm b/lib/Variable/Magic.pm index 0736798..18c0cfc 100644 --- a/lib/Variable/Magic.pm +++ b/lib/Variable/Magic.pm @@ -13,13 +13,13 @@ Variable::Magic - Associate user-defined magic to variables from Perl. =head1 VERSION -Version 0.16 +Version 0.17 =cut our $VERSION; BEGIN { - $VERSION = '0.16'; + $VERSION = '0.17'; } =head1 SYNOPSIS