[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2014-05-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 44dac2e7fcb8 by Benjamin Peterson in branch '2.7': support pep 3118 format strings for ctypes objects with nontrivial shapes (closes #10744) http://hg.python.org/cpython/rev/44dac2e7fcb8 New changeset 22938bf57161 by Benjamin Peterson in branch

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2014-05-12 Thread mattip
mattip added the comment: Updated patch for default for empty shape, thanks eryksun -- Added file: http://bugs.python.org/file35224/hg-default-ctypes-fix-pep3118-format-strings-for-arrays-update.patch ___ Python tracker rep...@bugs.python.org

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2014-05-11 Thread mattip
mattip added the comment: Here are updated patches for 2.7 and HEAD. I've updated the patches for both python 2 and python 3 and addressed some of the issues here: 1. Added _ctypes_alloc_format_string_with_shape() to ctypes.h 2. Changed the buffer size calculation to 32 *ndim + 3 (for the

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2014-05-11 Thread mattip
mattip added the comment: Here is the patch for HEAD -- Added file: http://bugs.python.org/file35218/hg-default-ctypes-fix-pep3118-format-strings-for-arrays-update.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10744

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2014-05-11 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +amaury.forgeotdarc, belopolsky, meador.inge versions: +Python 3.5 -Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10744

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2014-05-11 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10744 ___ ___ Python-bugs-list

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2014-05-11 Thread eryksun
eryksun added the comment: The shape for the StructWithArrays test should be () in 3.x; it's None in 2.x. -- nosy: +eryksun versions: +Python 3.3 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10744

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2013-06-21 Thread Tillmann Karras
Changes by Tillmann Karras til...@gmail.com: -- nosy: +Tilka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10744 ___ ___ Python-bugs-list mailing

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2013-06-21 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- versions: +Python 3.4 -Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10744 ___

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2013-06-21 Thread STINNER Victor
STINNER Victor added the comment: @skrah: What is the status of this issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10744 ___ ___

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2013-06-21 Thread Stefan Krah
Stefan Krah added the comment: Basically someone has to review the patch and commit it. I'm not really using ctypes, so for me a decent review would take a while. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10744

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2013-06-21 Thread Ronald Oussoren
Ronald Oussoren added the comment: The correct format string for Py_ssize_t with sprintf is %PY_FORMAT_SIZE_Td (defined and explained in pyport.h). -- nosy: +ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10744

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2011-08-16 Thread Pauli Virtanen
Pauli Virtanen p...@iki.fi added the comment: The array notation is useful for arrays inside structs, such as T{(4)i(2,3)f}. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10744 ___

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2011-08-16 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10744 ___ ___

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2011-08-14 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Thanks for the patch. I agree with the interpretation of the format string. One thing is unclear though: Using this interpretation the multi-dimensional array notation in format strings only seems useful for pointers to arrays. The PEP

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2011-08-10 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10744 ___ ___ Python-bugs-list

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2010-12-21 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10744 ___ ___

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2010-12-21 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10744 ___ ___ Python-bugs-list mailing

[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)

2010-12-20 Thread Pauli Virtanen
New submission from Pauli Virtanen p...@iki.fi: Ctypes arrays have invalid buffer interface information (on Python 3.1.2): import ctypes x = (ctypes.c_double*2)() y = memoryview(x) y.shape (2,) y.format '(2)d' This implies that the array contains 2 items, each consisting of 2 floats,