Issue 1533486: long -> Py_ssize_t (C/API 1.2.1) (original) (raw)
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/43764
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) * ![]() |
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) * ![]() |
Date: 2008-03-08 10:05 |
Fixed in r61305. | ||
msg63401 - (view) | Author: Alexander Belopolsky (belopolsky) * ![]() |
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) * ![]() |
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:19 | admin | set | github: 43764 |
2008-03-13 07:19:14 | georg.brandl | set | messages: + |
2008-03-08 14:02:12 | belopolsky | set | messages: + |
2008-03-08 10:05:33 | georg.brandl | set | status: open -> closedresolution: fixedmessages: + |
2008-03-07 02:03:31 | belopolsky | set | nosy: + belopolskymessages: + |
2008-03-06 19:54:42 | loewis | set | components: - None |
2008-03-06 19:54:32 | loewis | set | assignee: georg.brandlcomponents: + Nonenosy: + georg.brandl |
2006-08-02 22🔞58 | jimjjewett | create |