msg58634 - (view) |
Author: Raymond Hettinger (rhettinger) *  |
Date: 2007-12-14 19:45 |
It would be helpful to have the name provide a cue that a macro is being used. |
|
|
msg58635 - (view) |
Author: Guido van Rossum (gvanrossum) *  |
Date: 2007-12-14 19:54 |
Agreed. |
|
|
msg58636 - (view) |
Author: Martin v. Löwis (loewis) *  |
Date: 2007-12-14 20:13 |
I assume that applies to Py_Refcnt and Py_Type as well? |
|
|
msg58637 - (view) |
Author: Christian Heimes (christian.heimes) *  |
Date: 2007-12-14 21:05 |
I think it would be easier to merge from trunk to py3k before the change and skip the revision in the next merge. The rename can be done with a simple find | xargs sed -i. A merge might be more painful. |
|
|
msg58734 - (view) |
Author: Christian Heimes (christian.heimes) *  |
Date: 2007-12-18 09:40 |
I tried a simple find | xargs sed replace and it worked well. find -name '*.c' -or -name '*.h' -or -name '*.rst' |
xargs sed -i s/Py_Size\(/Py_SIZE\(/g |
|
msg58793 - (view) |
Author: Christian Heimes (christian.heimes) *  |
Date: 2007-12-19 06:47 |
I've renamed the three macros and added the old names for b/w compatibility. |
|
|
msg58797 - (view) |
Author: Martin v. Löwis (loewis) *  |
Date: 2007-12-19 08:02 |
Why the compatibility? |
|
|
msg58798 - (view) |
Author: Martin v. Löwis (loewis) *  |
Date: 2007-12-19 08:06 |
FWIW, should PyUnicode_Check, PyTuple_Check etc. also change to PyUnicode_CHECK, PyTuple_CHECK etc because they are macros? |
|
|
msg58799 - (view) |
Author: Martin v. Löwis (loewis) *  |
Date: 2007-12-19 08:08 |
I've fixed PEP 3123 to update the spelling. |
|
|
msg58818 - (view) |
Author: Guido van Rossum (gvanrossum) *  |
Date: 2007-12-19 18:37 |
> FWIW, should PyUnicode_Check, PyTuple_Check etc. also change to > PyUnicode_CHECK, PyTuple_CHECK etc because they are macros? While this would technically be the right thing to do, those macros have had a long and productive life before 2.6 so I'd rather be compatible. IOW no. |
|
|
msg258838 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2016-01-22 21:17 |
New changeset 63183596db79 by Gregory P. Smith in branch '2.7': Per and : Document the Py_SIZE, Py_TYPE, Py_REFCNT macros. https://hg.python.org/cpython/rev/63183596db79 |
|
|