#if VMG_THREADSAFE
#define VMG_CLONE_CB(N) \
- z->cb_ ## N = (w->cb_ ## N) ? newRV_noinc(vmg_clone(SvRV(w->cb_ ## N), \
- w->owner)) \
+ z->cb_ ## N = (w->cb_ ## N) ? newRV_inc(vmg_clone(SvRV(w->cb_ ## N), \
+ w->owner)) \
: NULL;
STATIC MGWIZ *vmg_wizard_clone(pTHX_ const MGWIZ *w) {
diag "Using threads $v" if defined $v;
$v = $threads::shared::VERSION;
diag "Using threads::shared $v" if defined $v;
- diag 'This will leak a few scalars';
} else {
plan skip_all => 'This Variable::Magic isn\'t thread safe';
}