Skip to content

Commit b651cef

Browse files
committed
Add comment to assertion
1 parent e6ff4b9 commit b651cef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Objects/moduleobject.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ static PyMemberDef module_members[] = {
2929

3030
static void
3131
assert_def_missing_or_redundant(PyModuleObject *m) {
32+
/* We copy all relevant info into the module object.
33+
* Modules created using a def keep a reference to that (statically
34+
* allocated) def; the info there should match what we have in the module.
35+
*/
3236
#ifdef Py_DEBUG
3337
if (m->md_token_is_def) {
3438
PyModuleDef *def = (PyModuleDef *)m->md_token;

0 commit comments

Comments
 (0)