diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:44:49 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:49 +0300 |
commit | 718c552901d703c502ccbefdfc3c9028d608b947 (patch) | |
tree | 46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /contrib/tools/python/src/Include/objimpl.h | |
parent | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff) | |
download | ydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/tools/python/src/Include/objimpl.h')
-rw-r--r-- | contrib/tools/python/src/Include/objimpl.h | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/contrib/tools/python/src/Include/objimpl.h b/contrib/tools/python/src/Include/objimpl.h index c02c47ed10..c7c611d212 100644 --- a/contrib/tools/python/src/Include/objimpl.h +++ b/contrib/tools/python/src/Include/objimpl.h @@ -56,7 +56,7 @@ must use the platform malloc heap(s), or shared memory, or C++ local storage or operator new), you must first allocate the object with your custom allocator, then pass its pointer to PyObject_{Init, InitVar} for filling in its Python- specific fields: reference count, type pointer, possibly others. You should -be aware that Python has no control over these objects because they don't +be aware that Python has no control over these objects because they don't cooperate with the Python memory manager. Such objects may not be eligible for automatic garbage collection and you have to make sure that they are released accordingly whenever their destructor gets called (cf. the specific @@ -100,7 +100,7 @@ PyAPI_FUNC(void) PyObject_Free(void *); /* Macros */ -#if defined(WITH_PYMALLOC) && defined(PYMALLOC_DEBUG) +#if defined(WITH_PYMALLOC) && defined(PYMALLOC_DEBUG) PyAPI_FUNC(void *) _PyObject_DebugMalloc(size_t nbytes); PyAPI_FUNC(void *) _PyObject_DebugRealloc(void *p, size_t nbytes); PyAPI_FUNC(void) _PyObject_DebugFree(void *p); @@ -114,16 +114,16 @@ PyAPI_FUNC(void) _PyObject_DebugCheckAddressApi(char api, const void *p); PyAPI_FUNC(void *) _PyMem_DebugMalloc(size_t nbytes); PyAPI_FUNC(void *) _PyMem_DebugRealloc(void *p, size_t nbytes); PyAPI_FUNC(void) _PyMem_DebugFree(void *p); -#endif +#endif #define PyObject_MALLOC PyObject_Malloc #define PyObject_REALLOC PyObject_Realloc #define PyObject_FREE PyObject_Free -#define PyObject_Del PyObject_Free -#define PyObject_DEL PyObject_Free - -#ifdef PYMALLOC_DEBUG /* WITH_PYMALLOC && PYMALLOC_DEBUG */ -PyAPI_FUNC(void) _PyObject_DebugMallocStats(void); +#define PyObject_Del PyObject_Free +#define PyObject_DEL PyObject_Free + +#ifdef PYMALLOC_DEBUG /* WITH_PYMALLOC && PYMALLOC_DEBUG */ +PyAPI_FUNC(void) _PyObject_DebugMallocStats(void); #endif /* for source compatibility with 2.2 */ @@ -236,20 +236,20 @@ PyAPI_FUNC(PyVarObject *) _PyObject_GC_Resize(PyVarObject *, Py_ssize_t); /* for source compatibility with 2.2 */ #define _PyObject_GC_Del PyObject_GC_Del -/* - * Former over-aligned definition of PyGC_Head, used to compute the size of the - * padding for the new version below. - */ -union _gc_head; -union _gc_head_old { - struct { - union _gc_head_old *gc_next; - union _gc_head_old *gc_prev; - Py_ssize_t gc_refs; - } gc; - long double dummy; -}; - +/* + * Former over-aligned definition of PyGC_Head, used to compute the size of the + * padding for the new version below. + */ +union _gc_head; +union _gc_head_old { + struct { + union _gc_head_old *gc_next; + union _gc_head_old *gc_prev; + Py_ssize_t gc_refs; + } gc; + long double dummy; +}; + /* GC information is stored BEFORE the object structure. */ typedef union _gc_head { struct { @@ -257,8 +257,8 @@ typedef union _gc_head { union _gc_head *gc_prev; Py_ssize_t gc_refs; } gc; - double dummy; /* Force at least 8-byte alignment. */ - char dummy_padding[sizeof(union _gc_head_old)]; + double dummy; /* Force at least 8-byte alignment. */ + char dummy_padding[sizeof(union _gc_head_old)]; } PyGC_Head; extern PyGC_Head *_PyGC_generation0; |