We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7eb8727 commit 3c77f38Copy full SHA for 3c77f38
Include/pymem.h
@@ -72,9 +72,9 @@ PyAPI_FUNC(void) PyMem_Free(void *);
72
/* Returns NULL to indicate error if a negative size or size larger than
73
Py_ssize_t can represent is supplied. Helps prevents security holes. */
74
#define PyMem_MALLOC(n) ((size_t)(n) > (size_t)PY_SSIZE_T_MAX ? NULL \
75
- : malloc((n) ? (n) : 1))
+ : malloc((n) != 0? (n) : 1))
76
#define PyMem_REALLOC(p, n) ((size_t)(n) > (size_t)PY_SSIZE_T_MAX ? NULL \
77
- : realloc((p), (n) ? (n) : 1))
+ : realloc((p), (n) != 0? (n) : 1))
78
#define PyMem_FREE free
79
80
#endif /* PYMALLOC_DEBUG */
0 commit comments