sv.h: Turn off AMAGIC flag in Gv_AMG
authorFather Chrysostomos <sprout@cpan.org>
Fri, 18 May 2012 15:52:02 +0000 (08:52 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 22 May 2012 01:09:26 +0000 (18:09 -0700)
commit9299023c08583d1430e423584af75641cf0e1513
treece7ab80e80de3276ffb53e79334bb47ea80ec1a1
parent0adc25b0c21a5e7b4a9dedeed0ece7327302ac9a
sv.h: Turn off AMAGIC flag in Gv_AMG

This makes no functional changes.

If a stash has its AMAGIC flag on, then when the overload caches are
updated we can turn off the flag if it turns out that there is no
overloading.

Gv_AMG is the easiest place to unset this flag, as Gv_AMupdate has
‘return 0’ in more than one place.

This is for efficiency’s sake, as an object that inherits overloading
but then loses it through @ISA changes will still have to go through
extra checks due to SvAMAGIC returning true.

This also offsets an inefficiency to be introduced in later commits:
changes to @ISA will set the AMAGIC flag.
sv.h