Revision history for Variable-Magic
+0.14 2008-03-24 12:35 UTC
+ + Fix : t/16-huf.t failures on Solaris and FreeBSD caused by not
+ updating mg->mg_ptr after Renew-ing it on dispell.
+ + Fix : Undefining MGf_DUP caused the wizard's magic to be wrongly
+ initialized. MGf_DUP now appears as true from the user point of
+ view, but the dup callback isn't actually set.
+ + Fix : Warnings with blead due to copy callbacks now taking an I32 (API
+ change #33256).
+ + Fix : vmg_svt_val() and vmg_uvar_del() aren't required if no uvar
+ magic is available.
+ + Tst : Tests now output the version of optional modules loaded.
+
0.13 2008-03-19 14:35 UTC
+ Doc : Link to coverage report.
+ Fix : Correct dependencies listing in META.yml.
--- #YAML:1.0
name: Variable-Magic
-version: 0.13
+version: 0.14
abstract: Associate user-defined magic to variables from Perl.
license: perl
author:
- Vincent Pit <perl@profvince.com>
-generated_by: ExtUtils::MakeMaker version 6.44
+generated_by: ExtUtils::MakeMaker version 6.42
distribution_type: module
requires:
Carp: 0
# define MGf_COPY 0
#endif
-#undef MGf_DUP /* Disable it for now. */
#ifndef MGf_DUP
# define MGf_DUP 0
#endif
/* ... Magic cast/dispell .................................................. */
+#if VMG_UVAR
STATIC I32 vmg_svt_val(pTHX_ IV, SV *);
STATIC void vmg_uvar_del(SV *sv, MAGIC *prevmagic, MAGIC *mg, MAGIC *moremagic) {
Safefree(mg->mg_ptr);
Safefree(mg);
}
+#endif /* VMG_UVAR */
STATIC UV vmg_cast(pTHX_ SV *sv, SV *wiz, AV *args) {
#define vmg_cast(S, W, A) vmg_cast(aTHX_ (S), (W), (A))
/* Revert the original uvar magic. */
uf[0] = uf[1];
Renew(uf, 1, struct ufuncs);
+ mg->mg_ptr = (char *) uf;
mg->mg_len = sizeof(struct ufuncs);
} else {
/* Remove the uvar magic. */
}
#if MGf_COPY
-STATIC int vmg_svt_copy(pTHX_ SV *sv, MAGIC *mg, SV *nsv, const char *key, int keylen) {
+STATIC int vmg_svt_copy(pTHX_ SV *sv, MAGIC *mg, SV *nsv, const char *key,
+# if PERL_API_VERSION_GE(5, 11, 0)
+ I32 keylen
+# else
+ int keylen
+# endif
+ ) {
SV *keysv;
int ret;
}
#endif /* MGf_COPY */
-#if MGf_DUP
+#if 0 /* MGf_DUP */
STATIC int vmg_svt_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *param) {
return 0;
}
VMG_SET_SVT_CB(ST(i++), copy);
#endif /* MGf_COPY */
#if MGf_DUP
- VMG_SET_SVT_CB(ST(i++), dup);
+ /* VMG_SET_SVT_CB(ST(i++), dup); */
+ i++;
+ t->svt_dup = NULL;
+ w->cb_dup = NULL;
#endif /* MGf_DUP */
#if MGf_LOCAL
VMG_SET_SVT_CB(ST(i++), local);
Variable::Magic - Associate user-defined magic to variables from Perl.
VERSION
- Version 0.13
+ Version 0.14
SYNOPSIS
use Variable::Magic qw/wizard cast dispell/;
=head1 VERSION
-Version 0.13
+Version 0.14
=cut
our $VERSION;
BEGIN {
- $VERSION = '0.13';
+ $VERSION = '0.14';
}
=head1 SYNOPSIS
plan skip_all => 'Hash::Util::FieldHash required for testing uvar interaction';
} else {
plan tests => 12;
+ my $v = $Hash::Util::FieldHash::VERSION;
+ diag "Using Hash::Util::FieldHash $v" if defined $v;
}
Hash::Util::FieldHash::fieldhash(\my %h);
SKIP: {
eval "use Tie::Array";
skip 'Tie::Array required to test copy magic on arrays', 8 if $@;
+ diag "Using Tie::Array $Tie::Array::VERSION" if defined $Tie::Array::VERSION;
tie my @a, 'Tie::StdArray';
@a = (1 .. 10);
SKIP: {
eval "use Tie::Hash";
skip 'Tie::Hash required to test copy magic on hashes', 14 if $@;
+ diag "Using Tie::Hash $Tie::Hash::VERSION" if defined $Tie::Hash::VERSION;
tie my %h, 'Tie::StdHash';
%h = (a => 1, b => 2, c => 3);
plan skip_all => "Symbol::gensym required for testing magic for globs";
} else {
plan tests => 7;
+ diag "Using Symbol $Symbol::VERSION" if defined $Symbol::VERSION;
}
use Variable::Magic qw/wizard cast dispell/;