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: wrong type for wintypes.BYTE
Type: behavior Stage:
Components: ctypes Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, belopolsky, meador.inge, techtonik
Priority: normal Keywords: patch

Created on 2012-10-31 17:02 by techtonik, last changed 2022-04-11 14:57 by admin.

Files
File name Uploaded Description Edit
Issue16376.diff BreamoreBoy, 2014-07-13 14:48 Change BYTE definition fron c_byte to c_ubyte review
Messages (2)
msg174331 - (view) Author: anatoly techtonik (techtonik) Date: 2012-10-31 17:02
Windows BYTE type is unsigned char, but ctypes defines it as signed.

{{{
BYTE	
A byte (8 bits).
This type is declared in WinDef.h as follows:
typedef unsigned char BYTE;
typedef unsigned char BYTE;
}}}
http://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx

http://hg.python.org/cpython/file/e5f39546989f/Lib/ctypes/wintypes.py#l4
msg222935 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-13 14:48
All cbytes tests passed after the change was made but I've no idea as to the impact of this.
History
Date User Action Args
2022-04-11 14:57:37adminsetgithub: 60580
2021-06-17 10:29:15iritkatrielsetnosy: + amaury.forgeotdarc, belopolsky

versions: + Python 3.9, Python 3.10, Python 3.11, - Python 2.7, Python 3.4, Python 3.5
2019-04-26 19:11:14BreamoreBoysetnosy: - BreamoreBoy
2014-07-13 14:48:39BreamoreBoysetfiles: + Issue16376.diff
versions: - Python 3.1, Python 3.2, Python 3.3
nosy: + BreamoreBoy

messages: + msg222935

keywords: + patch
2012-12-29 03:58:11meador.ingesetnosy: + meador.inge
2012-11-01 17:15:41santoso.wijayasettype: behavior
2012-11-01 17:15:31santoso.wijayasetversions: + Python 3.4, Python 3.5
2012-10-31 17:02:55techtonikcreate