Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dcb45c3

Browse files
author
Vladimir Marangozov
committed
Fix a typo in the PyMem_Resize macro, found by Andrew Kuchling
1 parent e8e9d11 commit dcb45c3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Include/pymem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ extern DL_IMPORT(void) PyMem_Free(void *);
114114
#define PyMem_New(type, n) \
115115
( (type *) PyMem_Malloc((n) * sizeof(type)) )
116116
#define PyMem_Resize(p, type, n) \
117-
( (p) = (type *) PyMem_Realloc((n) * sizeof(type)) )
117+
( (p) = (type *) PyMem_Realloc((p), (n) * sizeof(type)) )
118118
#define PyMem_Del(p) PyMem_Free(p)
119119

120120
/* Macros */

0 commit comments

Comments
 (0)