From: Nicholas Clark Date: Sun, 17 Apr 2011 08:36:54 +0000 (+0100) Subject: Avoid using assert() on ithreaded 5.8.8 and earlier, as it needs my_perl X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5f04c81daf0e38670b8dac45bd369bc508da50b6;p=p5sagit%2FDevel-Size.git Avoid using assert() on ithreaded 5.8.8 and earlier, as it needs my_perl --- diff --git a/CHANGES b/CHANGES index 67d5b72..2ae83ba 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Revision history for Perl extension Devel::Size. +0.73_50 2011-04-17 nicholas + * Avoid using assert() on ithreaded 5.8.8 and earlier, as it needs my_perl + 0.73 2011-04-16 nicholas * Revert a bad assertion introduced in 0.72_50, which was logically wrong. - and a test to demonstrate one case that would trigger it diff --git a/Size.xs b/Size.xs index fa2d12a..32e6269 100644 --- a/Size.xs +++ b/Size.xs @@ -106,7 +106,11 @@ check_new(struct state *st, const void *const p) { bits -= 8; } while (bits > LEAF_BITS + BYTE_BITS); /* bits now 16 always */ +#if !defined(MULTIPLICITY) || PERL_VERSION > 8 || (PERL_VERSION == 8 && PERL_SUBVERSION > 8) + /* 5.8.8 and early have an assert() macro that uses Perl_croak, hence needs + a my_perl under multiplicity */ assert(bits == 16); +#endif leaf_p = (U8 **)tv_p; i = (unsigned int)((cooked_p >> bits) & 0xFF); if (!leaf_p[i])