Skip to content

bpo-1635741: testbuffer heap types - #22131

Closed
koubaa wants to merge 2 commits into
python:masterfrom
koubaa:bpo-1635741-testbuffer-heap-types
Closed

bpo-1635741: testbuffer heap types#22131
koubaa wants to merge 2 commits into
python:masterfrom
koubaa:bpo-1635741-testbuffer-heap-types

Conversation

@koubaa

@koubaa koubaa commented Sep 7, 2020

Copy link
Copy Markdown
Contributor
@koubaa

koubaa commented Sep 7, 2020

Copy link
Copy Markdown
Contributor Author

@vstinner @shihai1991 @corona10 I tried to take the conversions of just the heap types from #22003 in this PR. The tests are crashing here starting from the second commit (the staticarray conversion to a heap type did not cause any problems). I'm putting it up for review in case any of you could help me spot the problem.

multi-phase init, moving more globals to the module state, and any PEP7 style changes are going to come in a follow-up once I can identify the problems with this change.

Comment thread Modules/_testbuffer.c
staticarray_dealloc(StaticArrayObject *self)
{
PyTypeObject *tp = Py_TYPE(self);
PyObject_Del(self);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tp->tp_free(self) in here?

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See compiler warnings at https://github.com/python/cpython/pull/22131/files , like:

‘ndarray_as_buffer’ defined but not used [-Wunused-variable]

@skrah

skrah commented Sep 8, 2020

Copy link
Copy Markdown
Contributor

This is a test module. The PR removes a test that explicitly tests static types at the request of @scoder .

It is not necessary to make changes to this module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

6 participants