summaryrefslogtreecommitdiffstats
path: root/Include/pymem.h
diff options
context:
space:
mode:
authorluzpaz <luzpaz@users.noreply.github.com>2017-11-05 13:37:50 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2017-11-05 13:37:50 (GMT)
commita5293b4ff2c1b5446947b4986f98ecf5d52432d4 (patch)
treebe2f5e686be63814c02eabc61a899631ec7a08ac /Include/pymem.h
parentcf296537f164abeacd83011239881f75f290ed31 (diff)
downloadcpython-a5293b4ff2c1b5446947b4986f98ecf5d52432d4.zip
cpython-a5293b4ff2c1b5446947b4986f98ecf5d52432d4.tar.gz
cpython-a5293b4ff2c1b5446947b4986f98ecf5d52432d4.tar.bz2
Fix miscellaneous typos (#4275)
Diffstat (limited to 'Include/pymem.h')
-rw-r--r--Include/pymem.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/Include/pymem.h b/Include/pymem.h
index 2170e0f..2670dcd 100644
--- a/Include/pymem.h
+++ b/Include/pymem.h
@@ -132,11 +132,11 @@ PyAPI_FUNC(char *) _PyMem_Strdup(const char *str);
*/
#define PyMem_New(type, n) \
- ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
- ( (type *) PyMem_Malloc((n) * sizeof(type)) ) )
+ ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
+ ( (type *) PyMem_Malloc((n) * sizeof(type)) ) )
#define PyMem_NEW(type, n) \
- ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
- ( (type *) PyMem_MALLOC((n) * sizeof(type)) ) )
+ ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
+ ( (type *) PyMem_MALLOC((n) * sizeof(type)) ) )
/*
* The value of (p) is always clobbered by this macro regardless of success.
@@ -145,17 +145,17 @@ PyAPI_FUNC(char *) _PyMem_Strdup(const char *str);
* caller's memory error handler to not lose track of it.
*/
#define PyMem_Resize(p, type, n) \
- ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
- (type *) PyMem_Realloc((p), (n) * sizeof(type)) )
+ ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
+ (type *) PyMem_Realloc((p), (n) * sizeof(type)) )
#define PyMem_RESIZE(p, type, n) \
- ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
- (type *) PyMem_REALLOC((p), (n) * sizeof(type)) )
+ ( (p) = ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \
+ (type *) PyMem_REALLOC((p), (n) * sizeof(type)) )
/* PyMem{Del,DEL} are left over from ancient days, and shouldn't be used
* anymore. They're just confusing aliases for PyMem_{Free,FREE} now.
*/
-#define PyMem_Del PyMem_Free
-#define PyMem_DEL PyMem_FREE
+#define PyMem_Del PyMem_Free
+#define PyMem_DEL PyMem_FREE
#ifndef Py_LIMITED_API
typedef enum {
@@ -212,7 +212,7 @@ PyAPI_FUNC(void) PyMem_SetAllocator(PyMemAllocatorDomain domain,
- PyObject_Malloc(), PyObject_Realloc() and PyObject_Free()
Newly allocated memory is filled with the byte 0xCB, freed memory is filled
- with the byte 0xDB. Additionnal checks:
+ with the byte 0xDB. Additional checks:
- detect API violations, ex: PyObject_Free() called on a buffer allocated
by PyMem_Malloc()