[New-bugs-announce] [issue17917] use PyModule_AddIntMacro() instead of PyModule_AddIntConstant() when applicable

Charles-François Natali report at bugs.python.org
Mon May 6 15:10:37 CEST 2013


New submission from Charles-François Natali:

In many cases, PyModule_AddIntMacro() could be used instead of PyModule_AddIntConstant(), e.g. in socketmodule.c and posixmodule.c:

PyModule_AddIntMacro(m, AF_INET6);

vs (currently)

PyModule_AddIntConstant(m, "AF_INET6", AF_INET6);

It reduces the possibility of typo and is less verbose.

----------
keywords: easy
messages: 188531
nosy: neologix
priority: low
severity: normal
stage: needs patch
status: open
title: use PyModule_AddIntMacro() instead of PyModule_AddIntConstant() when applicable
type: enhancement
versions: Python 3.4

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


More information about the New-bugs-announce mailing list