Unverified Commit d159a563 authored by Ralf W. Grosse-Kunstleve's avatar Ralf W. Grosse-Kunstleve Committed by GitHub
Browse files

static allocation for PyModuleDef, to avoid leak check errors. (#2413)

* Initializing PyModuleDef object with PyModuleDef_HEAD_INIT.

Python 3.8 documentation: m_base - Always initialize this member to PyModuleDef_HEAD_INIT.

Long-standing (since first github commit in 2015), inconsequential bug.

Also removing inconsequential Py_INCREF(def): PyModule_Create() resets the reference count to 1.

* git rebase master

* moving static PyModuleDef declaration to global scope, as requested by @wjakob

* renaming the two new macros, to start with PYBIND11_DETAIL_MODULE
parent 3c7ef56b
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment