This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: long -> Py_ssize_t (C/API 1.2.1)
Type: Stage:
Components: Documentation Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: belopolsky, georg.brandl, jimjjewett
Priority: normal Keywords:

Created on 2006-08-02 22:18 by jimjjewett, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg60957 - (view) Author: Jim Jewett (jimjjewett) Date: 2006-08-02 22:18
In the C/API reference manual section 1.2.1, should

"assuming sizeof(long) >= sizeof(char*)"

change long to Py_ssize_t?


msg63344 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2008-03-07 02:03
I think it should be changed to "because sizeof(Py_ssize_t) == 
sizeof(void*)"
msg63394 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-03-08 10:05
Fixed in r61305.
msg63401 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2008-03-08 14:02
Georg, did you miss the s/assuming/because/ part of my proposal?  Python 
guarantees that sizeof(Py_ssize_t) == sizeof(size_t) == sizeof(void*). (See PEP 353.)

"Assuming" is therefore misleading because it suggests that it may not 
be always true.
msg63497 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-03-13 07:19
PEP 353 says:
"Py_intptr_t needs to be the same size as void*, and Py_ssize_t the same
size as size_t. These could differ, e.g. on machines where pointers have
segment and offset."
History
Date User Action Args
2022-04-11 14:56:19adminsetgithub: 43764
2008-03-13 07:19:14georg.brandlsetmessages: + msg63497
2008-03-08 14:02:12belopolskysetmessages: + msg63401
2008-03-08 10:05:33georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg63394
2008-03-07 02:03:31belopolskysetnosy: + belopolsky
messages: + msg63344
2008-03-06 19:54:42loewissetcomponents: - None
2008-03-06 19:54:32loewissetassignee: georg.brandl
components: + None
nosy: + georg.brandl
2006-08-02 22:18:58jimjjewettcreate