From 2be07f6865409fc6760b4ba093ae3163619dda43 Mon Sep 17 00:00:00 2001 From: Lukas Mai Date: Thu, 20 Mar 2025 01:05:07 +0100 Subject: [PATCH] win32/perlhost.h: revert changes to SETUPEXCHANGE This was broken by 48bda52b92, which removed the `*` before `xptr`. Without `*`, we set our `iptr` (a class member) to a bogus pointer, and the assignment to `xptr` (which is a function parameter and hence a local variable) is effectively dead code. --- win32/perlhost.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/win32/perlhost.h b/win32/perlhost.h index a7708cafbf2f..af5e320afae4 100644 --- a/win32/perlhost.h +++ b/win32/perlhost.h @@ -2143,11 +2143,11 @@ CPerlHost::CPerlHost(void) #define SETUPEXCHANGE(xptr, iptr, table) \ STMT_START { \ if (xptr) { \ - *(void**)&iptr = (void*)xptr; \ - *(void**)&xptr = (void*)&table; \ + iptr = *xptr; \ + *xptr = &table; \ } \ else { \ - *(void**)&iptr = (void*)&table; \ + iptr = &table; \ } \ } STMT_END