Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-1635741: testbuffer heap types #22131

Closed

Conversation

koubaa
Copy link
Contributor

@koubaa koubaa commented Sep 7, 2020

@koubaa
Copy link
Contributor Author

koubaa commented Sep 7, 2020

@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.

@@ -2734,7 +2721,9 @@ staticarray_init(PyObject *self, PyObject *args, PyObject *kwds)
static void
staticarray_dealloc(StaticArrayObject *self)
{
PyTypeObject *tp = Py_TYPE(self);
PyObject_Del(self);
Copy link
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?

Copy link
Member

@vstinner vstinner left a comment

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
Copy link
Contributor

skrah commented Sep 8, 2020

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants