Skip to content

socketmodule.c does not handle errors on module creation extension-modules  #111253

Closed
@sobolevn

Description

@sobolevn

Bug report

It handles most with a specialized macro:

cpython/Modules/socketmodule.c

Lines 7716 to 7722 in 81eba76

/* Kernel event messages */
#ifdef PF_SYSTEM
ADD_INT_MACRO(m, PF_SYSTEM);
#endif
#ifdef AF_SYSTEM
ADD_INT_MACRO(m, AF_SYSTEM);
#endif

but not these ones:

cpython/Modules/socketmodule.c

Lines 7724 to 7731 in 81eba76

/* FreeBSD divert(4) */
#ifdef PF_DIVERT
PyModule_AddIntMacro(m, PF_DIVERT);
#endif
#ifdef AF_DIVERT
PyModule_AddIntMacro(m, AF_DIVERT);
#endif

Introduced in #96536

Linked PRs

Metadata

Metadata

Assignees

Labels

extension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions