[issue23319] Missing SWAP_INT in I_set_sw

2015-07-16 Thread Matthieu Gautier

Matthieu Gautier added the comment:

The bug is also present in Python 2.7.

Is it possible to backport this fix ?

--
versions: +Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23319
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23319] Missing SWAP_INT in I_set_sw

2015-07-09 Thread Meador Inge

Meador Inge added the comment:

I will review this today.

--
assignee:  - meador.inge
stage:  - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23319
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23319] Missing SWAP_INT in I_set_sw

2015-07-08 Thread Matthieu Gautier

Changes by Matthieu Gautier d...@mgautier.fr:


--
versions: +Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23319
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23319] Missing SWAP_INT in I_set_sw

2015-06-24 Thread Matthieu Gautier

Matthieu Gautier added the comment:

A little ping.

With a new patch integrating the unit test.

--
Added file: http://bugs.python.org/file39800/ctypes_swap_uint_unittest.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23319
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23319] Missing SWAP_INT in I_set_sw

2015-06-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23319
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23319] Missing SWAP_INT in I_set_sw

2015-01-25 Thread Matthieu Gautier

New submission from Matthieu Gautier:

I_set_sw function is missing a SWAP_INT.

This leads to wrong set of bitfield value.

Here is a script to reproduce:

--
from ctypes import *

class HEADER(BigEndianStructure):
   _fields_ = ( ('pad', c_uint32, 16),
('v1', c_uint32, 4),
('v2', c_uint32, 12)
  )

b = bytearray(4)
header = HEADER.from_buffer(b)

header.type = 1
assert b == b'\x00\x00\x10\x00'

header.mode = 0x234
assert b == b'\x00\x00\x12\x34'
--

--
components: ctypes
files: ctypes_swap_uint.patch
keywords: patch
messages: 234682
nosy: mgautierfr
priority: normal
severity: normal
status: open
title: Missing SWAP_INT in I_set_sw
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file37856/ctypes_swap_uint.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23319
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com