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: Define PY_UINT64_T on Windows 32bit
Type: enhancement Stage: needs patch
Components: Interpreter Core, Windows Versions: Python 3.4
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, loewis, ncoghlan, python-dev, tim.golden, tim.peters, vstinner
Priority: normal Keywords:

Created on 2013-10-29 13:50 by christian.heimes, last changed 2022-04-11 14:57 by admin.

Messages (10)
msg201635 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-10-29 13:50
For PEP 456 it would be useful to have PY_UINT64_T on 32bit Windows. Does anybody see a problem with Victor's idea? I like it.

Victor wrote in http://bugs.python.org/issue19183#msg201629:

To support Windows 32 bit, the following code in PC/pyconfig.h can be modified to use __int64 or _W64: see ssize_t definition below in the same file.

#ifndef PY_UINT64_T
#if SIZEOF_LONG_LONG == 8
#define HAVE_UINT64_T 1
#define PY_UINT64_T unsigned PY_LONG_LONG
#endif
#endif
msg201637 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2013-10-29 14:21
LGTM
msg201642 - (view) Author: Tim Golden (tim.golden) * (Python committer) Date: 2013-10-29 15:40
Fine by me
msg201644 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-10-29 15:58
This issue has no patch.
msg201650 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-10-29 18:31
It seems no patch is needed to get PY_UINT64_T on 32bit Windows:

>>> import sys
>>> sys.version
'3.4.0a4+ (pep-456:f0a7e606c2d0, Oct 29 2013, 19:24:12) [MSC v.1600 32 bit (Intel)]'
>>> sys.maxsize
2147483647
>>> sys.hash_info
sys.hash_info(width=32, modulus=2147483647, inf=314159, nan=0, imag=1000003, algorithm='siphash24', hash_bits=64, seed_bits=128)
msg201651 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2013-10-29 18:45
Yes, it should be taken care of already, because of this in PC/pyconfig.h:

#ifdef MS_WIN32
...
#define SIZEOF_LONG_LONG 8

That defines the symbol triggering the PY_UINT64_T define shown in the original message in this issue.
msg201652 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-10-29 18:45
New changeset daa1ab27b5c2 by Victor Stinner in branch 'default':
Issue #19433: test_capi: add tests on the size of some C types
http://hg.python.org/cpython/rev/daa1ab27b5c2
msg201654 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-10-29 18:49
See also issue #17884: "Try to reuse stdint.h types like int32_t".
msg201656 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-10-29 19:00
New changeset 5bf96a96f31d by Victor Stinner in branch 'default':
Issue #19433: test_capi: check signness of some C types
http://hg.python.org/cpython/rev/5bf96a96f31d
msg235864 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2015-02-12 23:17
Is there any more work needed on this or can it be closed?  Please note the reference to #17884 in msg201654.
History
Date User Action Args
2022-04-11 14:57:52adminsetgithub: 63632
2019-03-15 23:07:05BreamoreBoysetnosy: - BreamoreBoy
2015-02-13 00:32:32brian.curtinsetnosy: - brian.curtin
2015-02-12 23:17:07BreamoreBoysetnosy: + BreamoreBoy
messages: + msg235864
2013-10-29 19:00:02python-devsetmessages: + msg201656
2013-10-29 18:49:17vstinnersetmessages: + msg201654
2013-10-29 18:45:48python-devsetnosy: + python-dev
messages: + msg201652
2013-10-29 18:45:21tim.peterssetnosy: + tim.peters
messages: + msg201651
2013-10-29 18:31:45christian.heimessetmessages: + msg201650
2013-10-29 15:58:52vstinnersetmessages: + msg201644
2013-10-29 15:40:38tim.goldensetmessages: + msg201642
2013-10-29 14:21:55loewissetmessages: + msg201637
2013-10-29 13:50:22christian.heimescreate