From 8682f578c1c8fd0486c886b001729907a5409a9f Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Sun, 21 Aug 2016 17:41:56 +1000 Subject: Issue #27782: Fix m_methods handling in multiphase init Multi-phase extension module import now correctly allows the ``m_methods`` field to be used to add module level functions to instances of non-module types returned from ``Py_create_mod``. Patch by Xiang Zhang. --- Doc/c-api/module.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Doc/c-api') diff --git a/Doc/c-api/module.rst b/Doc/c-api/module.rst index e810c69b1d..7724350d3c 100644 --- a/Doc/c-api/module.rst +++ b/Doc/c-api/module.rst @@ -324,7 +324,7 @@ The available slot types are: :c:type:`PyModule_Type`. Any type can be used, as long as it supports setting and getting import-related attributes. However, only ``PyModule_Type`` instances may be returned if the - ``PyModuleDef`` has non-*NULL* ``m_methods``, ``m_traverse``, ``m_clear``, + ``PyModuleDef`` has non-*NULL* ``m_traverse``, ``m_clear``, ``m_free``; non-zero ``m_size``; or slots other than ``Py_mod_create``. .. c:var:: Py_mod_exec -- cgit v1.2.1