[New-bugs-announce] [issue27332] Clinic: first parameter for module-level functions should be PyObject*, not PyModuleDef*

Petr Viktorin report at bugs.python.org
Thu Jun 16 12:33:33 EDT 2016


New submission from Petr Viktorin:

Currently, Argument Clinic generates "PyModuleDef * module" for the first argument of module-level functions. But, the functions are passed the actual module object, not the ModuleDef.

The correct type to use is PyObject*, which is used for modules in the PyModule_* API.

(It turns out nothing in core Python currently uses the argument except passing it to other _impl functions, but this could change as PEP 489 is improved upon.)

The attached patch contains manual changes only. Please run `make clinic` after applying it to regenerate allll the code.

----------
components: Argument Clinic
files: 0001-clinic-Switch-the-module-argument-to-PyObject.patch
keywords: patch
messages: 268676
nosy: encukou, larry, ncoghlan
priority: normal
severity: normal
status: open
title: Clinic: first parameter for module-level functions should be PyObject*, not PyModuleDef*
versions: Python 3.6
Added file: http://bugs.python.org/file43418/0001-clinic-Switch-the-module-argument-to-PyObject.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27332>
_______________________________________


More information about the New-bugs-announce mailing list