summaryrefslogtreecommitdiffstats
path: root/Include/cpython/memoryobject.h
Commit message (Collapse)AuthorAgeFilesLines
* gh-106320: Remove private _PyManagedBuffer_Type (#108431)Victor Stinner2023-08-241-2/+0
| | | | Remove private _PyManagedBuffer_Type variable. Move it to the internal C API and no longer export it.
* gh-104223: Fix issues with inheriting from buffer classes (#104227)Jelle Zijlstra2023-05-081-0/+1
| | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-89653: PEP 670: Convert macros to functions (#99843)Victor Stinner2022-11-281-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert macros to static inline functions to avoid macro pitfalls, like duplication of side effects: * DK_ENTRIES() * DK_UNICODE_ENTRIES() * PyCode_GetNumFree() * PyFloat_AS_DOUBLE() * PyInstanceMethod_GET_FUNCTION() * PyMemoryView_GET_BASE() * PyMemoryView_GET_BUFFER() * PyMethod_GET_FUNCTION() * PyMethod_GET_SELF() * PySet_GET_SIZE() * _PyHeapType_GET_MEMBERS() Changes: * PyCode_GetNumFree() casts PyCode_GetNumFree.co_nfreevars from int to Py_ssize_t to be future proof, and because Py_ssize_t is commonly used in the C API. * PyCode_GetNumFree() doesn't cast its argument: the replaced macro already required the exact type PyCodeObject*. * Add assertions in some functions using "CAST" macros to check the arguments type when Python is built with assertions (debug build). * Remove an outdated comment in unicodeobject.h.
* gh-79315: Add Include/cpython/memoryobject.h header (#99723)Victor Stinner2022-11-231-0/+42
Move non-limited C API from Include/memoryobject.h to a new Include/cpython/memoryobject.h header file.