Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Apr 4, 2020

Convert PyObject_CheckBuffer() macro to a function to hide
implementation details: the macro accessed directly
PyTypeObject.tp_as_buffer field.

https://bugs.python.org/issue40170

@vstinner
Copy link
Member Author

vstinner commented Apr 5, 2020

PyObject_CheckBuffer() is used for example by:

  • PyBytes_FromObject()
  • PyMemoryView_FromObject()
  • PyUnicode_FSDecoder()
  • PyObject_CopyData()
  • w_complex_object() of marshal.c

Convert PyObject_CheckBuffer() macro to a function to hide
implementation details: the macro accessed directly the
PyTypeObject.tp_as_buffer member.
@vstinner vstinner merged commit ef5c615 into python:master Apr 7, 2020
@vstinner vstinner deleted the check_buffer branch April 7, 2020 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants