This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix overload index mismatch in overloading logic.
[perl5.git] / thread.h
index 655e827..7718d4b 100644 (file)
--- a/thread.h
+++ b/thread.h
 #define THREAD_RET_CAST(x)     ((any_t) x)
 
 #define DETACH(t)              cthread_detach(t->self)
-#define JOIN(t, avp)           (*(avp) = (AV *)cthread_join(t->self))
+#define JOIN(t, avp)           (*(avp) = MUTABLE_AV(cthread_join(t->self)))
 
 #define PERL_SET_CONTEXT(t)    cthread_set_data(cthread_self(), t)
 #define PERL_GET_CONTEXT       cthread_data(cthread_self())