#include "XSUB.h"
#include "ppport.h"
+/* Not yet in ppport.h */
+#ifndef CvISXSUB
+# define CvISXSUB(cv) (CvXSUB(cv) ? TRUE : FALSE)
+#endif
+
#ifdef _MSC_VER
/* "structured exception" handling is a Microsoft extension to C and C++.
It's *not* C++ exception handling - C++ exception handling can't capture
if (check_new(tv, CvOUTSIDE(thing))) {
total_size += thing_size((SV *)CvOUTSIDE(thing), tv);
}
- if (check_new(tv, CvSTART(thing))) {
- total_size += op_size(CvSTART(thing), tv);
- }
- if (check_new(tv, CvROOT(thing))) {
- total_size += op_size(CvROOT(thing), tv);
+ if (CvISXSUB(thing)) {
+ SV *sv = cv_const_sv((CV *)thing);
+ if (sv) {
+ total_size += thing_size(sv, tv);
+ }
+ } else {
+ if (check_new(tv, CvSTART(thing))) {
+ total_size += op_size(CvSTART(thing), tv);
+ }
+ if (check_new(tv, CvROOT(thing))) {
+ total_size += op_size(CvROOT(thing), tv);
+ }
}
TAG;break;
CODE:
{
SV *thing = orig_thing;
- /* Hash to track our seen pointers */
- //HV *tracking_hash = newHV();
SV *warn_flag;
TRACKING *tv;
Newz( 0xfc0ff, tv, 1, TRACKING );
CODE:
{
SV *thing = orig_thing;
- /* Hash to track our seen pointers */
- //HV *tracking_hash;
TRACKING *tv;
/* Array with things we still need to do */
AV *pending_array;
}
/* init these after the go_yell above */
- //tracking_hash = newHV();
Newz( 0xfc0ff, tv, 1, TRACKING );
pending_array = newAV();