Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner 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
MemberAuthor

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.
@vstinnervstinner merged commit ef5c615 into python:masterApr 7, 2020
@vstinnervstinner deleted the check_buffer branch April 7, 2020 23:13
Sign up for freeto 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

@vstinner@the-knights-who-say-ni@bedevere-bot