Le jeudi 29 septembre 2011 02:07:02, Benjamin Peterson a écrit : > 2011/9/28 victor.stinner <python-check...@python.org>: > > http://hg.python.org/cpython/rev/36fc514de7f0 > > changeset: 72512:36fc514de7f0 > > user: Victor Stinner <victor.stin...@haypocalc.com> > > date: Thu Sep 29 01:12:24 2011 +0200 > > summary: > > Enhance Py_ARRAY_LENGTH(): fail at build time if the argument is not an > > array > > > > Move other various macros to pymcacro.h > > > > Thanks Rusty Russell for having written these amazing C macros! > > > > files: > > Include/Python.h | 19 +-------- > > Include/pymacro.h | 57 +++++++++++++++++++++++++++ > > Do we really need a new file? Why not pyport.h where other compiler stuff > goes?
I'm not sure that pyport.h is the right place to add Py_MIN, Py_MAX, Py_ARRAY_LENGTH. pyport.h looks to be related to all things specific to the platform like INT_MAX, Py_VA_COPY, ... pymacro.h contains platform independant macros. I would like to suggest the opposite: move platform independdant macros from pyport.h to pymacro.h :-) Suggestions: - Py_ARITHMETIC_RIGHT_SHIFT - Py_FORCE_EXPANSION - Py_SAFE_DOWNCAST Victor _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com