Skip to content

Commit 4edee86

Browse files
author
tim_one
committed
Small anal correctness tweaks:
_PyObject_DebugMalloc: explicitly cast PyObject_Malloc's result to the target pointer type. _PyObject_DebugDumpStats: change decl of arena_alignment from unsigned int to unsigned long. This is for the 2.3 release only (it's new code). git-svn-id: http://svn.python.org/projects/python/trunk@26370 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent b65fd13 commit 4edee86

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Objects/obmalloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ _PyObject_DebugMalloc(size_t nbytes)
964964
return NULL;
965965
}
966966

967-
p = PyObject_Malloc(total);
967+
p = (uchar *)PyObject_Malloc(total);
968968
if (p == NULL)
969969
return NULL;
970970

@@ -1231,7 +1231,7 @@ _PyObject_DebugDumpStats(void)
12311231
/* # of free pools + pools not yet carved out of current arena */
12321232
uint numfreepools = 0;
12331233
/* # of bytes for arena alignment padding */
1234-
uint arena_alignment = 0;
1234+
ulong arena_alignment = 0;
12351235
/* # of bytes in used and full pools used for pool_headers */
12361236
ulong pool_header_bytes = 0;
12371237
/* # of bytes in used and full pools wasted due to quantization,

0 commit comments

Comments
 (0)