Re: [Python-Dev] [Python-checkins] cpython: Enhance Py_ARRAY_LENGTH(): fail at build time if the argument is not an array

2011-10-01 Thread Martin v. Löwis
 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'm -1 on additional header files as well. If no other reasonable place
is found, Python.h is still available.

Regards,
Martin
___
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


Re: [Python-Dev] [Python-checkins] cpython: Enhance Py_ARRAY_LENGTH(): fail at build time if the argument is not an array

2011-09-29 Thread Jim Jewett
On Wed, Sep 28, 2011 at 8:07 PM, Benjamin Peterson benja...@python.org wrote:
 2011/9/28 victor.stinner python-check...@python.org:
 http://hg.python.org/cpython/rev/36fc514de7f0
 changeset:   72512:36fc514de7f0

...
 Thanks Rusty Russell for having written these amazing C macros!

 Do we really need a new file? Why not pyport.h where other compiler stuff 
 goes?

I would expect pyport to contain only system-specific macros.  These
seem more universal.

-jJ
___
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


Re: [Python-Dev] [Python-checkins] cpython: Enhance Py_ARRAY_LENGTH(): fail at build time if the argument is not an array

2011-09-29 Thread Mark Dickinson
On Thu, Sep 29, 2011 at 2:45 AM, Victor Stinner
victor.stin...@haypocalc.com wrote:
 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

Not sure about the other two, but Py_ARITHMETIC_RIGHT_SHIFT is
definitely platform dependent, which is why it's in pyport.h in the
first place.

Mark
___
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


Re: [Python-Dev] [Python-checkins] cpython: Enhance Py_ARRAY_LENGTH(): fail at build time if the argument is not an array

2011-09-28 Thread Benjamin Peterson
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?


-- 
Regards,
Benjamin
___
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


Re: [Python-Dev] [Python-checkins] cpython: Enhance Py_ARRAY_LENGTH(): fail at build time if the argument is not an array

2011-09-28 Thread Victor Stinner
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