#include "XSUB.h"
#include "ppport.h"
+#ifndef PERL_COMBI_VERSION
+#define PERL_COMBI_VERSION (PERL_REVISION * 1000000 + PERL_VERSION * 1000 + \
+ PERL_SUBVERSION)
+#endif
+
/* Not yet in ppport.h */
#ifndef CvISXSUB
# define CvISXSUB(cv) (CvXSUB(cv) ? TRUE : FALSE)
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 */
+#if PERL_COMBI_VERSION > 5008008 || (!defined(MULTIPLICITY) && !defined(USE_THREADS))
+ /* 5.8.8 and earlier have an assert() macro that uses Perl_croak, hence
+ needs a my_perl under multiplicity. Similarly, under 5.005 threads
+ Perl_croak needs a thr. In both cases, just skip the assert. */
assert(bits == 16);
#endif
leaf_p = (U8 **)tv_p;
#endif
};
+#if PERL_COMBI_VERSION < 5008001
+typedef AV PADLIST;
+#endif
+
+static void
+padlist_size(pTHX_ struct state *const st, const PADLIST * const padl,
+ const int recurse) {
+
#if PERL_VERSION*1000+PERL_SUBVERSION >= 21007
/* This is, as ever, excessively nosey with the implementation, and hence
fragile. */
-padlist_size(pTHX_ struct state *const st, const PADLIST * const padl,
- const int recurse) {
SSize_t i;
const PADNAMELIST *pnl;
st->total_size += sizeof(PAD*) * i;
while (--i)
sv_size(aTHX_ st, (SV*)PadlistARRAY(padl)[i], recurse);
-}
#elif defined PadlistNAMES
-static void
-padlist_size(pTHX_ struct state *const st, const PADLIST * const padl,
- const int recurse) {
+
SSize_t i;
if (!check_new(st, padl))
return;
st->total_size += sizeof(PAD*) * i;
while (--i)
sv_size(aTHX_ st, (SV*)PadlistARRAY(padl)[i], recurse);
-}
+
#else
-static void
-padlist_size(pTHX_ struct state *const st, const AV * const padl,
- const int recurse) {
+
sv_size(aTHX_ st, (SV*)padl, recurse);
-}
+
#endif
+}
static void
sv_size(pTHX_ struct state *const st, const SV * const orig_thing,