summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2023-03-05 12:40:19 +0000
committerPaul Evans <leonerd@leonerd.org.uk>2023-03-06 10:41:20 +0000
commit75ea41ae51200ab26d84c418f08859a784a71b85 (patch)
tree498308616b1680531c1c5020a3492160a368d626 /class.c
parenta287df13cf577b9af034665350e89ba94eb55d77 (diff)
downloadperl-75ea41ae51200ab26d84c418f08859a784a71b85.tar.gz
Have newATTRSUB() call class_wrap_method_body() if CVf_IsMETHOD
Diffstat (limited to 'class.c')
-rw-r--r--class.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/class.c b/class.c
index 5a3938139d..4a1d83d615 100644
--- a/class.c
+++ b/class.c
@@ -792,7 +792,11 @@ Perl_class_seal_stash(pTHX_ HV *stash)
ops = op_append_list(OP_LINESEQ, ops, fieldop);
}
+ /* initfields CV should not get class_wrap_method_body() called on its
+ * body. pretend it isn't a method for now */
+ CvIsMETHOD_off(PL_compcv);
CV *initfields = newATTRSUB(floor_ix, NULL, NULL, NULL, ops);
+ CvIsMETHOD_on(initfields);
aux->xhv_class_initfields_cv = initfields;
}