Ensure that size() doesn't add the referent's size for non SVt_RV references.
authorNicholas Clark <nick@ccl4.org>
Tue, 19 Apr 2011 10:17:12 +0000 (11:17 +0100)
committerNicholas Clark <nick@ccl4.org>
Tue, 19 Apr 2011 20:06:13 +0000 (21:06 +0100)
commitdb519f11479d13b54dc99485711784b4d8c3f5ac
tree6a6849997e43483ca97e2a2a4fc0c143d62c4913
parent1d6fef943eaa10527312a01e19d4b7ae4044c16d
Ensure that size() doesn't add the referent's size for non SVt_RV references.

Previously it was adding the referent's size if the reference happened to be
other-than-SVt_RV (ie a blessed reference, or a reference assigned to a
previously used variable).

This requires stopping thing_size() from recursing into references when called
from size(). So add a boolean parameter controlling whether to recurse. As this
means changing every call to it, also rename it to sv_size(), and re-order the
parameters so that struct state is first.
CHANGES
Size.xs
t/recurse.t