Skip to content

Commit 1b66608

Browse files
committedMar 20, 2025·
win32/perlhost.h: revert changes to SETUPEXCHANGE
This was broken by 48bda52, 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.
1 parent dd8625e commit 1b66608

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎win32/perlhost.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -2143,11 +2143,11 @@ CPerlHost::CPerlHost(void)
21432143
#define SETUPEXCHANGE(xptr, iptr, table) \
21442144
STMT_START { \
21452145
if (xptr) { \
2146-
*(void**)&iptr = (void*)xptr; \
2147-
*(void**)&xptr = (void*)&table; \
2146+
iptr = *xptr; \
2147+
*xptr = &table; \
21482148
} \
21492149
else { \
2150-
*(void**)&iptr = (void*)&table; \
2150+
iptr = &table; \
21512151
} \
21522152
} STMT_END
21532153

0 commit comments

Comments
 (0)
Please sign in to comment.