]>
git.vpit.fr Git - perl/modules/Variable-Magic.git/log
Vincent Pit [Sun, 23 Jun 2013 02:24:58 +0000 (23:24 -0300)]
Update the bug tracker URL in META after the rt.perl.org upgrade
Vincent Pit [Sun, 23 Jun 2013 02:23:02 +0000 (23:23 -0300)]
Typo in POD
Reported by dsteinbrunner@pobox.com.
This fixes RT #86338.
Vincent Pit [Wed, 30 Jan 2013 17:10:51 +0000 (15:10 -0200)]
Update VPIT::TestHelpers to
e8344578
Vincent Pit [Mon, 5 Nov 2012 02:30:14 +0000 (00:30 -0200)]
This is 0.52
Vincent Pit [Mon, 5 Nov 2012 02:11:20 +0000 (00:11 -0200)]
Add VMG_COMPAT_SCALAR_NOLEN
Starting from perl 5.17.4, perl no longer calls 'len' magic on scalars.
This new compatibility macro reflects this change.
This fixes RT #80388.
Vincent Pit [Mon, 5 Nov 2012 01:36:33 +0000 (23:36 -0200)]
Make t/35-stash.t pass with perl 5.17.4 and above
Since this version, delete on a stash does no longer calls 'store' uvar
magic twice.
Vincent Pit [Fri, 2 Nov 2012 01:08:09 +0000 (23:08 -0200)]
Simplify Config loading in Makefile.PL
Vincent Pit [Fri, 2 Nov 2012 00:27:25 +0000 (22:27 -0200)]
Don't run the POD spelling test in taint mode
This causes the test to crash on perl 5.12 and below with sensitive
architectures like FreeBSD. Ultimately the root of the issue seems to have
been https://rt.perl.org/rt3/Public/Bug/Display.html?id=60378.
Thanks Slaven Rezic for debugging this.
Vincent Pit [Wed, 22 Aug 2012 10:14:10 +0000 (12:14 +0200)]
Update author tests requirements
Vincent Pit [Wed, 22 Aug 2012 10:12:49 +0000 (12:12 +0200)]
Add BUILD_REQUIRES to WriteMakefile()
Vincent Pit [Mon, 20 Aug 2012 17:39:21 +0000 (19:39 +0200)]
Check destruction order for exceptions thrown in free callbacks
Vincent Pit [Mon, 20 Aug 2012 17:03:06 +0000 (19:03 +0200)]
Update how author tests load their dependencies
Also make sure that the kwalitee test unlinks its byproducts.
Vincent Pit [Sat, 18 Aug 2012 15:00:32 +0000 (17:00 +0200)]
This is 0.51
Vincent Pit [Sat, 18 Aug 2012 14:33:43 +0000 (16:33 +0200)]
Documentation tweaks
In particular, document how 'free' callbacks propagate exceptions.
Vincent Pit [Sat, 18 Aug 2012 13:48:41 +0000 (15:48 +0200)]
Properly propagate exceptions when a free callback dies at the end of eval
Vincent Pit [Sat, 18 Aug 2012 13:46:50 +0000 (15:46 +0200)]
Kill Debian_CPANTS.txt suffixes as well
Vincent Pit [Sun, 12 Aug 2012 17:14:00 +0000 (19:14 +0200)]
Make the 'reset RMG flag' workaround thread-safe
This uses trampoline ops for threaded perls, where it is not allowed to
modify the contents PL_op points to, but just what PL_op points at.
Vincent Pit [Sun, 12 Aug 2012 17:11:01 +0000 (19:11 +0200)]
Reset the SV each time for the 'reset RMG flag' workaround
This bug caused the workaround to only update the flag of the first hash
that it was called for, regardless of subsequent calls with different
hashes.
Vincent Pit [Sat, 11 Aug 2012 10:28:29 +0000 (12:28 +0200)]
Remove an unused variable
Vincent Pit [Sat, 11 Aug 2012 10:27:57 +0000 (12:27 +0200)]
Prettify the default no-op callback
Vincent Pit [Sun, 5 Aug 2012 20:39:43 +0000 (22:39 +0200)]
Don't crash if dispell is called in a clear, free or uvar callback
Vincent Pit [Fri, 10 Aug 2012 16:47:59 +0000 (18:47 +0200)]
Rename vmg_uvar_del() to vmg_mg_del() to reuse its logic
The new vmg_mg_del() is now also used to remove our PERL_MAGIC_ext tokens.
Vincent Pit [Sat, 4 Aug 2012 23:18:02 +0000 (01:18 +0200)]
Make sure all entries of MY_CXT.b__op_stashes are initialized
Otherwise CLONE may be testing uninitialized memory areas.
Vincent Pit [Sat, 4 Aug 2012 21:50:23 +0000 (23:50 +0200)]
Fix indentation in vmg_call_sv()
The previous commit just made it obvious that it was misindented.
Vincent Pit [Sat, 4 Aug 2012 21:47:31 +0000 (23:47 +0200)]
Port the svt_free-specific part of vmg_call_sv() to a customizable hook
Vincent Pit [Sun, 5 Aug 2012 10:39:26 +0000 (12:39 +0200)]
Always enable VMG_SAVE_LAST_CX
This allows to remove the special case of only setting in_eval when we are
in a destructor.
Vincent Pit [Thu, 2 Aug 2012 21:52:18 +0000 (23:52 +0200)]
Make the uvar user data into a proper struct
Vincent Pit [Sun, 24 Jun 2012 23:00:56 +0000 (01:00 +0200)]
This is 0.50
Vincent Pit [Sun, 24 Jun 2012 22:51:11 +0000 (00:51 +0200)]
Improve Capture::Tiny discovery in t/17-ctl.t
Vincent Pit [Sun, 24 Jun 2012 22:50:26 +0000 (00:50 +0200)]
Don't use the main:: stash in the last test of t/17-ctl.t
As it is less subject to extra lookups.
This fixes RT #77991 in a better way.
Vincent Pit [Sun, 24 Jun 2012 22:30:12 +0000 (00:30 +0200)]
Consistently format magic types with I<>
Vincent Pit [Sun, 24 Jun 2012 22:08:08 +0000 (00:08 +0200)]
Remove a couple of commented asserts
Vincent Pit [Sun, 24 Jun 2012 22:07:45 +0000 (00:07 +0200)]
Leak less memory when an exception is thrown from a free callback
Vincent Pit [Sun, 24 Jun 2012 21:45:52 +0000 (23:45 +0200)]
Move the global destruction logic of t/15-self.t out in an helper module
Vincent Pit [Sun, 24 Jun 2012 19:19:50 +0000 (21:19 +0200)]
Lower t/17-ctl.t's last test expectations
With ActivePerl, there's only one line produced by this test because of
some strange interference between local *_, loading Exporter.pm and
compiling '-d _'. Since this test has also been broken recently by a
change in the core, it is more reliable to stop asking for the exact
count of matches.
This fixes RT #77991.
Vincent Pit [Sat, 23 Jun 2012 21:39:11 +0000 (23:39 +0200)]
Don't leak vtables and wizards freed during global destruction
At this time, we cannot access the callbacks, but we are still allowed
to call Safefree() and PerlMemShared_free().
Vincent Pit [Sat, 23 Jun 2012 21:20:48 +0000 (23:20 +0200)]
Cleaner version numbers
Vincent Pit [Sat, 23 Jun 2012 21:16:51 +0000 (23:16 +0200)]
Remove one extra mention to MGf_COPY
Also explicitely state from which perl versions the MGf_* constants are
available.
Vincent Pit [Sat, 23 Jun 2012 20:02:16 +0000 (22:02 +0200)]
Jumbo POD overhaul
Lots of rewordings and clarifications.
Vincent Pit [Thu, 21 Jun 2012 16:50:19 +0000 (18:50 +0200)]
Teach t/35-stash.t about perl 5.17.1
Vincent Pit [Tue, 5 Jun 2012 21:39:00 +0000 (23:39 +0200)]
This is 0.49
Vincent Pit [Tue, 5 Jun 2012 21:06:47 +0000 (23:06 +0200)]
Teach t/17-ctl.t about perl 5.17.0
Vincent Pit [Sun, 6 May 2012 13:16:42 +0000 (15:16 +0200)]
Reuse the diag() helper in the TestThreads module
Vincent Pit [Sun, 19 Feb 2012 13:09:03 +0000 (14:09 +0100)]
Require Module::ExtractUse 0.24 for the Kwalitee test
Vincent Pit [Fri, 17 Feb 2012 23:38:07 +0000 (00:38 +0100)]
This is 0.48
Vincent Pit [Fri, 17 Feb 2012 18:46:50 +0000 (19:46 +0100)]
Decorate the magic callbacks section
Vincent Pit [Fri, 17 Feb 2012 18:41:00 +0000 (19:41 +0100)]
Remove an useless #define wrap
Vincent Pit [Fri, 17 Feb 2012 18:16:42 +0000 (19:16 +0100)]
Bump copyright year
Vincent Pit [Fri, 17 Feb 2012 18:16:16 +0000 (19:16 +0100)]
Allow passing ref-to-undef as callbacks to install a noop callback
Vincent Pit [Fri, 17 Feb 2012 18:15:35 +0000 (19:15 +0100)]
In t/22-len.t, localize the wizard for strings to the SKIP block
Vincent Pit [Thu, 16 Feb 2012 22:51:02 +0000 (23:51 +0100)]
Move the sv length logic into a new vmg_sv_len() function
Vincent Pit [Thu, 16 Feb 2012 22:11:20 +0000 (23:11 +0100)]
Protect $@ inside Variable::Magic::TestWatcher::init_watcher
Vincent Pit [Thu, 16 Feb 2012 21:58:25 +0000 (22:58 +0100)]
Test that unqualified sub names as callbacks default to the current package
Vincent Pit [Thu, 27 Oct 2011 16:52:15 +0000 (18:52 +0200)]
This is 0.47
Vincent Pit [Wed, 26 Oct 2011 22:10:15 +0000 (00:10 +0200)]
Test 'delete' uvar magic and introduce VMG_COMPAT_HASH_DELETE_NOUVAR_VOID
Vincent Pit [Wed, 26 Oct 2011 21:33:18 +0000 (23:33 +0200)]
'store' and 'delete' uvar magics don't need the uvar/clear hack
Vincent Pit [Wed, 26 Oct 2011 20:57:54 +0000 (22:57 +0200)]
Clean up vmg_uvar_val() a bit
Vincent Pit [Wed, 26 Oct 2011 20:43:38 +0000 (22:43 +0200)]
Minimize the accesses to the optree during the uvar/clear hack
Vincent Pit [Wed, 26 Oct 2011 19:56:42 +0000 (21:56 +0200)]
Prettify the declaration of vmg_svt_copy()
Vincent Pit [Wed, 26 Oct 2011 19:56:15 +0000 (21:56 +0200)]
vmg_cast() should set mg_flags according to the vtable
And not according to the Perl callbacks.
Vincent Pit [Wed, 26 Oct 2011 18:45:00 +0000 (20:45 +0200)]
Make the watch { } wrapper properly apply context
Vincent Pit [Wed, 26 Oct 2011 17:26:26 +0000 (19:26 +0200)]
The magic signatures are no longer needed
Vincent Pit [Wed, 26 Oct 2011 17:22:13 +0000 (19:22 +0200)]
Enforce saner checks on wizard SVs and MAGIC tokens
This commit adds a variety of helper functions that extract the vmg_wizard
object from a SV or a MAGIC token. Version with (for direct interaction
with the user) and without checks (for magic callbacks, where we know the
MAGIC token is already valid) are provided.
Vincent Pit [Wed, 26 Oct 2011 15:57:32 +0000 (17:57 +0200)]
Reorder some code
Vincent Pit [Wed, 26 Oct 2011 15:50:13 +0000 (17:50 +0200)]
Rename vmg_wizard_* to vmg_wizard_sv_* and {MGWIZ,mgwiz}_* to vmg_wizard_*
Vincent Pit [Wed, 26 Oct 2011 14:52:27 +0000 (16:52 +0200)]
Clone wizard objects through dup magic
ptable.h is no longer needed.
Vincent Pit [Wed, 26 Oct 2011 14:12:20 +0000 (16:12 +0200)]
Clean up threads tests a bit
Vincent Pit [Wed, 26 Oct 2011 13:37:55 +0000 (15:37 +0200)]
Share the vtables with threaded perls
When a magical variable is cloned into a new thread, the associated vtables
aren't cloned by mg_dup(), but simply shared. This means that if a wizard
is casted upon a variable in the main interpreter, then a thread is created,
then the wizard is destroyed, and then the cloned variant of the magical
variable is manipulated, perl can no longer access the vtable (it was freed
when the wizard was destroyed) and memory misreads happen.
To solve this, the only solution is to make the vtables associated with
wizards shared and reference-counted.
Vincent Pit [Wed, 26 Oct 2011 10:02:11 +0000 (12:02 +0200)]
Wrap MUTEX_{LOCK,UNLOCK} in macros so can we don't have to #ifdef them
Vincent Pit [Wed, 26 Oct 2011 09:40:16 +0000 (11:40 +0200)]
MGf_COPY and MGf_DUP should always be set for the perls we consider
Vincent Pit [Tue, 25 Oct 2011 22:32:18 +0000 (00:32 +0200)]
Abstract the MGWIZ creation into a new vmg_mgwiz_alloc() function
Vincent Pit [Tue, 25 Oct 2011 22:25:38 +0000 (00:25 +0200)]
Pass the 'data' callback after the 'op_info' flag when calling _wizard()
Vincent Pit [Mon, 24 Oct 2011 19:57:55 +0000 (21:57 +0200)]
Threads tests may not be able to spawn all the threads
To work around this :
- move all the threads boilerplate to a new helper test module ;
- capture the warnings/errors that threads->create may throw and reprint
them properly as diagnostics ;
- don't set a plan in threads tests.
Vincent Pit [Mon, 24 Oct 2011 19:42:20 +0000 (21:42 +0200)]
Remove trailing whitespace
Vincent Pit [Sun, 23 Oct 2011 15:31:20 +0000 (17:31 +0200)]
Make sure code examples fit in a 80 columns terminal
Vincent Pit [Sun, 23 Oct 2011 14:55:07 +0000 (16:55 +0200)]
Preserve the PATH environment variable when running a sub-perl on cygwin
Vincent Pit [Mon, 5 Sep 2011 17:46:40 +0000 (19:46 +0200)]
Silence an "unused" compiler warning
Vincent Pit [Sun, 4 Sep 2011 21:32:06 +0000 (23:32 +0200)]
Tweak some optional module loading in tests
Vincent Pit [Wed, 24 Aug 2011 17:42:12 +0000 (19:42 +0200)]
Add META.json
Vincent Pit [Wed, 24 Aug 2011 12:52:54 +0000 (14:52 +0200)]
Encode the README file in UTF-8
Vincent Pit [Sun, 7 Aug 2011 16:17:22 +0000 (18:17 +0200)]
Replace $] by "$]"
An old bug could cause $] to be initialized to a wrong decimal value.
Since its stringified value was always right, we use it instead.
Occurences of $^V were also replaced by $].
Vincent Pit [Sun, 7 Aug 2011 16:05:30 +0000 (18:05 +0200)]
Ignore MYMETA.json
Vincent Pit [Sun, 7 Aug 2011 16:04:39 +0000 (18:04 +0200)]
Update vmg_opclass() for perl 5.15
Even if magic is no longer called by the aelem(fast).
Vincent Pit [Sun, 23 Jan 2011 16:44:38 +0000 (17:44 +0100)]
This is 0.46
Vincent Pit [Wed, 19 Jan 2011 17:45:36 +0000 (18:45 +0100)]
Switch to qw<>
Vincent Pit [Wed, 19 Jan 2011 17:29:15 +0000 (18:29 +0100)]
Update magical flags after dispelling magic
This fixes RT #64866.
Vincent Pit [Tue, 18 Jan 2011 12:33:36 +0000 (13:33 +0100)]
Bump copyright year
Vincent Pit [Tue, 18 Jan 2011 12:33:16 +0000 (13:33 +0100)]
Tighten the scope of two variables unused on 5.8
Vincent Pit [Sun, 21 Nov 2010 23:10:30 +0000 (00:10 +0100)]
This is 0.45
Vincent Pit [Sun, 21 Nov 2010 22:56:26 +0000 (23:56 +0100)]
A terser way to display versions for modules used in tests
Vincent Pit [Sun, 21 Nov 2010 22:43:16 +0000 (23:43 +0100)]
Only use Capture::Tiny when it is working on a simple example
Vincent Pit [Sun, 21 Nov 2010 13:43:04 +0000 (14:43 +0100)]
A bare glob that isn't part of a fetch doesn't call get magic anymore in 5.13.7
Vincent Pit [Sun, 21 Nov 2010 13:42:06 +0000 (14:42 +0100)]
Add more glob tests
Vincent Pit [Sun, 21 Nov 2010 13:23:09 +0000 (14:23 +0100)]
Wording fix
Vincent Pit [Thu, 28 Oct 2010 22:20:04 +0000 (00:20 +0200)]
Give a saner default to pPTBLMS
This silences a compiler warning.
Vincent Pit [Thu, 28 Oct 2010 22:19:32 +0000 (00:19 +0200)]
Skip NULL values when walking a table
ptable_fetch already returns NULL for nonexistent entries, so NULL can't
possibly have any other meaning than "this node is not currently in use".
Vincent Pit [Thu, 28 Oct 2010 22:18:08 +0000 (00:18 +0200)]
Add ptable_delete to ptable.h
Vincent Pit [Sat, 16 Oct 2010 12:34:04 +0000 (14:34 +0200)]
Explicitely state that C++ compilers aren't supported
Vincent Pit [Sun, 3 Oct 2010 00:22:17 +0000 (02:22 +0200)]
Ignore MYMETA.yml
Peter Rabbitson [Sat, 25 Sep 2010 18:18:36 +0000 (20:18 +0200)]
Clarify minimum perl 5.10.0 requirement for hash magic