classification
Title: wrong type for wintypes.BYTE
Type: behavior Stage:
Components: ctypes Versions: Python 3.5, Python 3.4, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, meador.inge, techtonik
Priority: normal Keywords: patch

Created on 2012-10-31 17:02 by techtonik, last changed 2014-07-13 14:48 by BreamoreBoy.

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
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:41santa4ntsettype: behavior
2012-11-01 17:15:31santa4ntsetversions: + Python 3.4, Python 3.5
2012-10-31 17:02:55techtonikcreate