Changes by Charles-François Natali cf.nat...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17917
Tshepang Lekhonkhobe added the comment:
@antoine
I don't understand This is a lot of code churn, but it touches code that is
unlikely to be modified otherwise, so I guess it's ok.. What does it mean it's
okay when it touches on code that's unlikely to be modified?
--
nosy: +tshepang
Charles-François Natali added the comment:
I don't understand This is a lot of code churn, but it touches code that is
unlikely to be modified otherwise, so I guess it's ok.. What does it mean
it's okay when it touches on code that's unlikely to be modified?
The problem with refactoring is
Tshepang Lekhonkhobe added the comment:
Ok, I thought so. Just wanted to make sure.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17917
___
___
Roundup Robot added the comment:
New changeset 12cbb5183d98 by Charles-Francois Natali in branch 'default':
Issue #17917: Use PyModule_AddIntMacro() instead of PyModule_AddIntConstant()
http://hg.python.org/cpython/rev/12cbb5183d98
--
nosy: +python-dev
STINNER Victor added the comment:
ins_macro-2.diff looks good to me, go ahead!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17917
___
___
Charles-François Natali added the comment:
PC/_msi.c: Oh, here you should remove cast to int. Example:
PyModule_AddIntMacro(m, (int)MSIDBOPEN_CREATEDIRECT);
I'm surprised that the does compile. You may have a
(int)MSIDBOPEN_CREATEDIRECT variable :-)
Probably, good catch ;-)
I'll fix
Changes by Charles-François Natali cf.nat...@gmail.com:
Added file: http://bugs.python.org/file30167/ins_macro-2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17917
___
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
Charles-François Natali added the comment:
Here's a (gigantic) patch.
I used an ad-hoc script for the conversion (next time I might try with
coccinelle).
I tested it on Linux, FreeBSD, Openindiana, OS-X and Windows.
--
keywords: +needs review, patch
nosy: +pitrou
stage: needs patch -
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17917
___
___
Python-bugs-list mailing
Changes by Charles-François Natali cf.nat...@gmail.com:
Added file: http://bugs.python.org/file30155/ins_macro.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17917
___
Antoine Pitrou added the comment:
This is a lot of code churn, but it touches code that is unlikely to be
modified otherwise, so I guess it's ok.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17917
STINNER Victor added the comment:
Could you please generete the same patch without --git so it can be reviewed on
Rietveld?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17917
___
Changes by Charles-François Natali cf.nat...@gmail.com:
Removed file: http://bugs.python.org/file30155/ins_macro.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17917
___
Changes by Charles-François Natali cf.nat...@gmail.com:
Added file: http://bugs.python.org/file30157/ins_macro-1.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17917
___
STINNER Victor added the comment:
Modules/fcntlmodule.c and Modules/posixmodule.c are using explicit cast to
long. I don't know if there is a good reason for such cast.
PC/_msi.c: Oh, here you should remove cast to int. Example:
PyModule_AddIntMacro(m, (int)MSIDBOPEN_CREATEDIRECT);
17 matches
Mail list logo