]> git.vpit.fr Git - perl/modules/Variable-Magic.git/commitdiff
Importing Variable-Magic-0.17.tar.gz v0.17
authorVincent Pit <vince@profvince.com>
Sun, 29 Jun 2008 16:24:52 +0000 (18:24 +0200)
committerVincent Pit <vince@profvince.com>
Sun, 29 Jun 2008 16:24:52 +0000 (18:24 +0200)
Changes
META.yml
Magic.xs
README
lib/Variable/Magic.pm

diff --git a/Changes b/Changes
index 659b4c4f208a0704d6ef706577a5eba02e8a7ac3..c74a5dc794d2de4ed6f934d24bc678e9430975b1 100644 (file)
--- 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
index 97417463e048faf56fc96954d632d5f01ab873cf..ec669c968fea9f81a60b20fffbbab0905cf86dbd 100644 (file)
--- 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:              
index c1e582ff13061d2fef15377983f7f58c77381a3b..61f8f1f6dff0341adcf7dec042db9dd3bba3d8e5 100644 (file)
--- a/Magic.xs
+++ b/Magic.xs
 # 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 55fe265b6fc4e238b2c64afea93bb6347dcc0f04..ab7c956def26409e77fe644e66652f7fdc4e1406 100644 (file)
--- 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/;
index 073679880b47223c7db1bb89fc0bd62824823f19..18c0cfc497c6654f07e18c50b3381cb6a5bdf64b 100644 (file)
@@ -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