gh-127604: Only define dump_pointer() if CAN_C_BACKTRACE (#132897)

This commit is contained in:
Victor Stinner
2025-04-25 09:28:34 +02:00
committed by GitHub
parent 22bc953aa9
commit c292f7f563

View File

@@ -879,12 +879,14 @@ _Py_DumpHexadecimal(int fd, uintptr_t value, Py_ssize_t width)
dump_hexadecimal(fd, value, width, 0);
}
#ifdef CAN_C_BACKTRACE
static void
dump_pointer(int fd, void *ptr)
{
PUTS(fd, "0x");
dump_hexadecimal(fd, (uintptr_t)ptr, sizeof(void*), 1);
}
#endif
static void
dump_char(int fd, char ch)