8000 Fix type · python/cpython@3350aa0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3350aa0

Browse files
committed
Fix type
1 parent 3a87da4 commit 3350aa0

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Modules/_testexternalinspection.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,16 @@ read_int(pid_t pid, uintptr_t address, int *result)
564564
return 0;
565565
}
566566

567+
static int
568+
read_unsigned_long(pid_t pid, uintptr_t address, unsigned long *result)
569+
{
570+
int bytes_read = read_memory(pid, address, sizeof(unsigned long), result);
571+
if (bytes_read < 0) {
572+
return -1;
573+
}
574+
return 0;
575+
}
576+
567577
static int
568578
read_pyobj(pid_t pid, uintptr_t address, PyObject *ptr_addr)
569579
{
@@ -694,8 +704,8 @@ parse_task_name(
694704
return NULL;
695705
}
696706

697-
int flags;
698-
err = read_int(
707+
unsigned long flags;
708+
err = read_unsigned_long(
699709
pid,
700710
(uintptr_t)task_name_obj.ob_type + offsets->type_object.tp_flags,
701711
&flags);

0 commit comments

Comments
 (0)
0