XS::APItest: fix type of destruct_test

MORTALSVFUNC_X needs a function of type 'void (pTHX_ SV *)' exactly.

Should fix this ASan error:

    scope.c:1979:8: runtime error: call to function destruct_test through pointer to incorrect function type 'void (*)(struct interpreter *, struct STRUCT_SV *)'
This commit is contained in:
Lukas Mai 2025-08-16 15:28:09 +02:00
parent 5e6221df8e
commit 65ced8fb6e

View File

@ -1597,8 +1597,8 @@ XSPP_wrapped(my_pp_anonlist, 0, 1)
#include "const-c.inc"
void
destruct_test(pTHX_ void *p) {
warn("In destruct_test: %" SVf "\n", (SV*)p);
destruct_test(pTHX_ SV *p) {
warn("In destruct_test: %" SVf "\n", p);
}
#if defined(USE_ITHREADS) && !defined(WIN32)