13 years agoRe-instate initial dereference in total_size()
Nicholas Clark [Sun, 17 Apr 2011 09:28:37 +0000]
Re-instate initial dereference in total_size()

We most definitely can push an AV or an HV onto the pending array. Despite
having a comment saying that we can't do that, that was exactly what the
previous code *was* doing, only within the switch statement.

Previously, this code:

    my $a = [];
    my $b = \$a;
    weaken $b;
    total_size($a)

was returning a value which happened to be the size of the magic structure
(but not the object hanging from it - fixme) due to the interaction of two
different bugs. The number it pulled out of its backside was
thing_size(rv, st) - thing_size(rv, NULL), where thing_size(...) called
magic_size(...), and that returned 0 always if the st parameter was NULL,
because check_new(st, p) always returns FALSE (ie not new) if the first
parameter is NULL. Good eh?)

13 years agoAvoid using assert() on ithreaded 5.8.8 and earlier, as it needs my_perl
Nicholas Clark [Sun, 17 Apr 2011 08:36:54 +0000]
Avoid using assert() on ithreaded 5.8.8 and earlier, as it needs my_perl

13 years agoBump $VERSION to 0.73_50
Nicholas Clark [Sun, 17 Apr 2011 08:23:45 +0000]
Bump $VERSION to 0.73_50

13 years agoThis is 0.73 - update META.yml
Nicholas Clark [Sat, 16 Apr 2011 16:31:31 +0000]
This is 0.73 - update META.yml

13 years agoUpdate CHANGES for 0.73
Nicholas Clark [Sat, 16 Apr 2011 06:41:12 +0000]
Update CHANGES for 0.73

Correct the year 2111 to 2011 in two previous entries.

13 years agoBump version to 0.73
Nicholas Clark [Sat, 16 Apr 2011 06:31:10 +0000]
Bump version to 0.73

13 years agoRevert the intent of cb11131e. st (was tv) can be NULL.
Nicholas Clark [Fri, 15 Apr 2011 20:38:03 +0000]
Revert the intent of cb11131e. st (was tv) can be NULL.

There's (currently) a call to thing_size() with a NULL st early in total_size().
None of the existing tests caused a code path to be followed that reaches the
assertion, so add one that does.

13 years agoThis is 0.72_52 - update META.yml
Nicholas Clark [Sat, 16 Apr 2011 15:41:48 +0000]
This is 0.72_52 - update META.yml

13 years agoReplace TRACKING with struct state, tv with st, and rename {new,free}_tracking()
Nicholas Clark [Fri, 15 Apr 2011 15:11:25 +0000]
Replace TRACKING with struct state, tv with st, and rename {new,free}_tracking()

13 years agoMerge the 4 static variables and TRACKING into a struct state.
Nicholas Clark [Fri, 15 Apr 2011 15:07:12 +0000]
Merge the 4 static variables and TRACKING into a struct state.

Add a new static function new_tracking(), to mirror free_tracking().

13 years agoAdd a test for the non-exceptional warnings.
Nicholas Clark [Fri, 15 Apr 2011 15:03:58 +0000]
Add a test for the non-exceptional warnings.

Requires Test::PerlRun, which doesn't yet exist on CPAN. Otherwise it skips.

13 years agoUse cmp_ok() when testing > 0, not isnt(..., 0);
Nicholas Clark [Fri, 15 Apr 2011 13:22:09 +0000]
Use cmp_ok() when testing > 0, not isnt(..., 0);

13 years agoEliminate needless test boilerplate, and duplicated effort.
Nicholas Clark [Fri, 15 Apr 2011 13:16:22 +0000]
Eliminate needless test boilerplate, and duplicated effort.

There's no need to change directory or duplicate the effects of -Mblib.
Let use do the importing, rather than an explicit import call.
use_ok() is arguably harmful - just let the use fail and take the entire test
out cleanly, rather than carrying on and generating meaningless failures.
No need to test ->can() and $VERSION in both - once is sufficient.

13 years agoSimplify the setup code in Size.pm
Nicholas Clark [Fri, 15 Apr 2011 12:43:23 +0000]
Simplify the setup code in Size.pm

We don't use @EXPORT, so don't mention it. As the only tag is :all, declare
@EXPORT_OK first, and define %EXPORT_TAGS in terms of it.

13 years agoBump $VERSION to 0.72_52
Nicholas Clark [Fri, 15 Apr 2011 12:40:45 +0000]
Bump $VERSION to 0.72_52

13 years agoThis is 0.72_51 - update META.yml
Nicholas Clark [Sat, 16 Apr 2011 15:38:20 +0000]
This is 0.72_51 - update META.yml

13 years agoAdd PERL_NO_GET_CONTEXT to improve performance under multiplicity.
Nicholas Clark [Fri, 15 Apr 2011 09:11:47 +0000]
Add PERL_NO_GET_CONTEXT to improve performance under multiplicity.

Add pTHX_ to thing_size() and op_size(). Also change both to static.

13 years agoRemove the SIGNATURE, as presently I don't have the capability to sign dists.
Nicholas Clark [Fri, 15 Apr 2011 08:43:26 +0000]
Remove the SIGNATURE, as presently I don't have the capability to sign dists.

The SIGNATURE file was from the 0.71 release, so was already rather stale.

13 years agoAdd the .git repository directory to MANIFEST.SKIP
Nicholas Clark [Thu, 14 Apr 2011 22:22:35 +0000]
Add the .git repository directory to MANIFEST.SKIP

13 years agoAdd a LICENSE section to the Makefile.PL.
Nicholas Clark [Thu, 14 Apr 2011 21:58:33 +0000]
Add a LICENSE section to the Makefile.PL.

13 years agoBump $VERSION to 0.72_51
Nicholas Clark [Thu, 14 Apr 2011 20:43:39 +0000]
Bump $VERSION to 0.72_51

13 years agoThis is 0.72_50 - update META.yml
Nicholas Clark [Sat, 16 Apr 2011 15:34:50 +0000]
This is 0.72_50 - update META.yml

13 years agoConvert C99 // comments to C89 /**/ comments.
Nicholas Clark [Thu, 14 Apr 2011 19:59:01 +0000]
Convert C99 // comments to C89 /**/ comments.

On some platforms, the only compilers are dogmatically C89.

Remove the comment '?try', presumably a reference to a possible place to use
__try/__except. There's something seriously wrong with the internal's data
structures if the chain of magic pointers is corrupt - carrying on silently
isn't a great idea.

13 years agoRemove commented out code from the pre-0.72 HV based tracking system.
Nicholas Clark [Thu, 14 Apr 2011 19:58:03 +0000]
Remove commented out code from the pre-0.72 HV based tracking system.

13 years agoInclude the size of constants in constant subs (resolves CPAN #58485)
Nicholas Clark [Thu, 14 Apr 2011 19:31:15 +0000]
Include the size of constants in constant subs (resolves CPAN #58485)

13 years agoResolve CPAN #58484: Devel::Size SEGVs on XSUBs post 5.9.4
Nicholas Clark [Thu, 14 Apr 2011 19:29:59 +0000]
Resolve CPAN #58484: Devel::Size SEGVs on XSUBs post 5.9.4

13 years agoNote that I am now maintaining it.
Nicholas Clark [Thu, 14 Apr 2011 19:14:55 +0000]
Note that I am now maintaining it.

Clarify that BrowserUK wrote the version of the pointer tracking for 0.72.
0.73's version has been somewhat refactored by me. (So blame me for the bugs.)

13 years agoEnforce the minimum perl version requirement in the Makefile.PL
Nicholas Clark [Thu, 14 Apr 2011 19:08:22 +0000]
Enforce the minimum perl version requirement in the Makefile.PL

This inform CPAN smokers to skip testing on earlier perl versions.

13 years agoConvert to XSLoader.
Nicholas Clark [Thu, 14 Apr 2011 19:06:56 +0000]
Convert to XSLoader.

13 years agoConvert the tracking system to a 256-way tree.
Nicholas Clark [Thu, 14 Apr 2011 18:54:34 +0000]
Convert the tracking system to a 256-way tree.

This avoids needing to make compiled-in assumptions about the memory map on 64
bit systems, which in turn means all the code and documentation relating to
that, and how to recompile if the assumptions fail, can go.

13 years agoCreate free_tracking() to de-duplicate the code to free the tracking structure.
Nicholas Clark [Thu, 14 Apr 2011 17:39:48 +0000]
Create free_tracking() to de-duplicate the code to free the tracking structure.

13 years agoUse cmp_ok() in place of ok() with a < comparison, for better diagnostics.
Nicholas Clark [Thu, 14 Apr 2011 17:23:23 +0000]
Use cmp_ok() in place of ok() with a < comparison, for better diagnostics.

Eliminate an unused lexical $tests.

13 years agoIn check_new(), tv can never be NULL, so assert() this.
Nicholas Clark [Thu, 14 Apr 2011 15:54:30 +0000]
In check_new(), tv can never be NULL, so assert() this.

This will simplify future refactoring.

13 years agoUse SvPVX_const() instead of SvPVX(), and const check_new().
Nicholas Clark [Thu, 14 Apr 2011 15:49:08 +0000]
Use SvPVX_const() instead of SvPVX(), and const check_new().

Also change check_new()'s return type to bool, as it only returns TRUE or FALSE,
and declare it static.

Without the consting, under -DDEBUGGING, the macro for SvPVX() assigns thing,
which is const SV *, to a void *, which elicits a legitimate compiler warning.
In turn, the return value of SvPVX_const() is const char *, which means that
check_new() needs to properly declare its parameter p as const void *.

13 years agoCatching SEGVs with __try/__except is MSVC only, not general C++
Nicholas Clark [Thu, 14 Apr 2011 13:19:15 +0000]
Catching SEGVs with __try/__except is MSVC only, not general C++

__try/__except is an MSVC extension to C++ *and* C, and is orthogonal to
"regular" C++ exception handling. As there's no way to catch a SEGV with
C++ exceptions (certainly not portably), and __try/__except is available in C,
there's nothing to be gained from using C++ exceptions, and hence making the
code require a C++ compiler. Hence remove the logic from Makefile.PL to force
compilation with a C++ compiler, which didn't even work well on "both" kinds of
OS, as it assumed that the C compiler was named *exactly* qr/\Ag?cc\z/, and
that the analogous C++ compiler was available and named g++.

[Which isn't true when it's named 'ccache gcc', 'gcc-mp-4.6' etc, or when cc
isn't gcc]

13 years agoNo need to explicitly check AvARYLEN in 5.10 and later.
Nicholas Clark [Thu, 14 Apr 2011 10:35:20 +0000]
No need to explicitly check AvARYLEN in 5.10 and later.

In 5.10 the struct slot was eliminated, and contents are now stored in magic,
which will already be found. Whilst there's no direct "harm" in looking again,
as the "seen" tracker will skip the second discovery, it's wasteful, and now
generates a compilation error, as AvARYLEN() expects a mutable pointer, whereas
the variable thing is const void *.

This also resolves CPAN RT #49437 - Devel::Size adds magic in Perl 5.10

13 years agoBump $VERSION to 0.72_50, ready for a development release.
Nicholas Clark [Thu, 14 Apr 2011 18:59:59 +0000]
Bump $VERSION to 0.72_50, ready for a development release.

13 years agoCorrect to 0.72 the CHANGES entry for the second "0.71".
Nicholas Clark [Thu, 14 Apr 2011 13:17:22 +0000]
Correct to 0.72 the CHANGES entry for the second "0.71".

13 years agoCorrect to 0.72 erroneous references to version '7.2'.
Nicholas Clark [Thu, 14 Apr 2011 13:04:43 +0000]
Correct to 0.72 erroneous references to version '7.2'.

13 years agoRemove DOS line endings from Makefile.PL and META.yml
Nicholas Clark [Thu, 14 Apr 2011 12:15:18 +0000]
Remove DOS line endings from Makefile.PL and META.yml

13 years agoimport Devel-Size 0.72 from CPAN
BrowserUk [Fri, 24 Oct 2008 21:28:13 +0000]
import Devel-Size 0.72 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.72
git-cpan-authorid: BROWSERUK
git-cpan-file:     authors/id/B/BR/BROWSERUK/Devel-Size-0.72.tar.gz

13 years agoimport Devel-Size 0.71 from CPAN
Tels [Sun, 24 Aug 2008 12:49:33 +0000]
import Devel-Size 0.71 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.71
git-cpan-authorid: TELS
git-cpan-file:     authors/id/T/TE/TELS/devel/Devel-Size-0.71.tar.gz

13 years ago0.70 as released to CPAN. (only metadata and Module::Install changes)
Tels [Sat, 16 Apr 2011 13:49:20 +0000]
0.70 as released to CPAN. (only metadata and Module::Install changes)

Module::Install upgraded to 0.77 from 0.71

13 years agoFix compilation under blead, and require at least 5.006
Tels [Sat, 16 Apr 2011 13:22:05 +0000]
Fix compilation under blead, and require at least 5.006

Compilation fix from Reini Urban.

Also, upgrade Module::Install to 0.71 from 0.68, and regenerate SIGNATURE.

13 years agoBump version to 0.70, and upgrade Module::Install to 0.88 from 0.85
Tels [Sat, 16 Apr 2011 13:17:37 +0000]
Bump version to 0.70, and upgrade Module::Install to 0.88 from 0.85

SIGNATURES has not been updated, hence changed files will fail the signature
test.

14 years agoimport Devel-Size 0.69 from CPAN
Tels [Sun, 12 Aug 2007 14:05:37 +0000]
import Devel-Size 0.69 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.69
git-cpan-authorid: TELS
git-cpan-file:     authors/id/T/TE/TELS/devel/Devel-Size-0.69.tar.gz

14 years agoimport Devel-Size 0.68 from CPAN
Tels [Tue, 12 Jun 2007 20:22:30 +0000]
import Devel-Size 0.68 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.68
git-cpan-authorid: TELS
git-cpan-file:     authors/id/T/TE/TELS/devel/Devel-Size-0.68.tar.gz

14 years agoimport Devel-Size 0.67 from CPAN
Tels [Thu, 15 Mar 2007 18:06:32 +0000]
import Devel-Size 0.67 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.67
git-cpan-authorid: TELS
git-cpan-file:     authors/id/T/TE/TELS/devel/Devel-Size-0.67.tar.gz

14 years agoimport Devel-Size 0.66 from CPAN
Tels [Fri, 2 Mar 2007 16:38:01 +0000]
import Devel-Size 0.66 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.66
git-cpan-authorid: TELS
git-cpan-file:     authors/id/T/TE/TELS/devel/Devel-Size-0.66.tar.gz

14 years agoimport Devel-Size 0.65 from CPAN
Tels [Sat, 24 Feb 2007 10:24:36 +0000]
import Devel-Size 0.65 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.65
git-cpan-authorid: TELS
git-cpan-file:     authors/id/T/TE/TELS/devel/Devel-Size-0.65.tar.gz

14 years agoimport Devel-Size 0.64 from CPAN
Dan Sugalski [Mon, 19 Dec 2005 23:51:47 +0000]
import Devel-Size 0.64 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.64
git-cpan-authorid: DSUGAL
git-cpan-file:     authors/id/D/DS/DSUGAL/Devel-Size-0.64.tar.gz

14 years agoimport Devel-Size 0.63 from CPAN
Dan Sugalski [Fri, 1 Jul 2005 16:43:17 +0000]
import Devel-Size 0.63 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.63
git-cpan-authorid: DSUGAL
git-cpan-file:     authors/id/D/DS/DSUGAL/Devel-Size-0.63.tar.gz

14 years agoimport Devel-Size 0.62 from CPAN
Dan Sugalski [Tue, 28 Jun 2005 16:01:59 +0000]
import Devel-Size 0.62 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.62
git-cpan-authorid: DSUGAL
git-cpan-file:     authors/id/D/DS/DSUGAL/Devel-Size-0.62.tar.gz

14 years agoimport Devel-Size 0.61 from CPAN
Dan Sugalski [Mon, 27 Jun 2005 20:24:51 +0000]
import Devel-Size 0.61 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.61
git-cpan-authorid: DSUGAL
git-cpan-file:     authors/id/D/DS/DSUGAL/Devel-Size-0.61.tar.gz

14 years agoimport Devel-Size 0.60 from CPAN
Dan Sugalski [Mon, 27 Jun 2005 20:06:45 +0000]
import Devel-Size 0.60 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.60
git-cpan-authorid: DSUGAL
git-cpan-file:     authors/id/D/DS/DSUGAL/Devel-Size-0.60.tar.gz

14 years agoimport Devel-Size 0.59 from CPAN
Dan Sugalski [Sat, 27 Nov 2004 21:45:06 +0000]
import Devel-Size 0.59 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.59
git-cpan-authorid: DSUGAL
git-cpan-file:     authors/id/D/DS/DSUGAL/Devel-Size-0.59.tar.gz

14 years agoimport Devel-Size 0.58 from CPAN
Dan Sugalski [Fri, 18 Jul 2003 16:56:24 +0000]
import Devel-Size 0.58 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.58
git-cpan-authorid: DSUGAL
git-cpan-file:     authors/id/D/DS/DSUGAL/Devel-Size-0.58.tar.gz

14 years agoimport Devel-Size 0.57 from CPAN
Dan Sugalski [Thu, 20 Mar 2003 18:15:45 +0000]
import Devel-Size 0.57 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.57
git-cpan-authorid: DSUGAL
git-cpan-file:     authors/id/D/DS/DSUGAL/Devel-Size-0.57.tar.gz

14 years agoimport Devel-Size 0.56 from CPAN
Dan Sugalski [Mon, 24 Feb 2003 16:44:26 +0000]
import Devel-Size 0.56 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.56
git-cpan-authorid: DSUGAL
git-cpan-file:     authors/id/D/DS/DSUGAL/Devel-Size-0.56.tar.gz

14 years agoimport Devel-Size 0.55 from CPAN
Dan Sugalski [Sun, 23 Feb 2003 17:03:51 +0000]
import Devel-Size 0.55 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.55
git-cpan-authorid: DSUGAL
git-cpan-file:     authors/id/D/DS/DSUGAL/Devel-Size-0.55.tar.gz

14 years agoimport Devel-Size 0.54 from CPAN
Dan Sugalski [Sat, 12 Oct 2002 18:14:42 +0000]
import Devel-Size 0.54 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.54
git-cpan-authorid: DSUGAL
git-cpan-file:     authors/id/D/DS/DSUGAL/Devel-Size-0.54.tar.gz

14 years agoimport Devel-Size 0.53 from CPAN
Dan Sugalski [Thu, 10 Oct 2002 19:34:33 +0000]
import Devel-Size 0.53 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.53
git-cpan-authorid: DSUGAL
git-cpan-file:     authors/id/D/DS/DSUGAL/Devel-Size-0.53.tar.gz

14 years agoimport Devel-Size 0.52 from CPAN
Dan Sugalski [Thu, 10 Oct 2002 04:11:06 +0000]
import Devel-Size 0.52 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.52
git-cpan-authorid: DSUGAL
git-cpan-file:     authors/id/D/DS/DSUGAL/Devel-Size-0.52.tar.gz

14 years agoimport Devel-Size 0.51 from CPAN
Dan Sugalski [Wed, 9 Oct 2002 18:48:27 +0000]
import Devel-Size 0.51 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.51
git-cpan-authorid: DSUGAL
git-cpan-file:     authors/id/D/DS/DSUGAL/Devel-Size-0.51.tar.gz

14 years agoimport Devel-Size 0.50 from CPAN
Dan Sugalski [Wed, 9 Oct 2002 17:28:49 +0000]
import Devel-Size 0.50 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.50
git-cpan-authorid: DSUGAL
git-cpan-file:     authors/id/D/DS/DSUGAL/Devel-Size-0.50.tar.gz

14 years agoimport Devel-Size 0.03 from CPAN
Dan Sugalski [Tue, 8 Oct 2002 18:04:15 +0000]
import Devel-Size 0.03 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.03
git-cpan-authorid: DSUGAL
git-cpan-file:     authors/id/D/DS/DSUGAL/Devel-Size-0.03.tar.gz

14 years agoimport Devel-Size 0.02 from CPAN
Dan Sugalski [Tue, 8 Oct 2002 17:53:32 +0000]
import Devel-Size 0.02 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.02
git-cpan-authorid: DSUGAL
git-cpan-file:     authors/id/D/DS/DSUGAL/Devel-Size-0.02.tar.gz

14 years agoinitial import of Devel-Size 0.01 from CPAN
Dan Sugalski [Tue, 8 Oct 2002 06:23:43 +0000]
initial import of Devel-Size 0.01 from CPAN

git-cpan-module:   Devel-Size
git-cpan-version:  0.01
git-cpan-authorid: DSUGAL
git-cpan-file:     authors/id/D/DS/DSUGAL/Devel-Size-0.01.tar.gz