Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bpo-30242: resolve some undefined behaviours in struct (#1418) | Xiang Zhang | 2017-05-15 | 1 | -5/+9 |
| | |||||
* | bpo-30224: remove outdated checks in struct (#1374) | Xiang Zhang | 2017-05-15 | 1 | -47/+15 |
| | |||||
* | bpo-29802: Fix reference counting in module-level struct functions (#1213) | Serhiy Storchaka | 2017-04-20 | 1 | -0/+1 |
| | | | | when pass arguments of wrong type. | ||||
* | bpo-29649: Improve struct.pack_into() boundary error messages (#424) | Andrew Nester | 2017-04-04 | 1 | -4/+30 |
| | |||||
* | Issue #29300: Use Argument Clinic for getting struct object from the format. | Serhiy Storchaka | 2017-02-04 | 1 | -65/+52 |
| | |||||
* | Rename struct.unpack() 2nd parameter to "buffer" | Victor Stinner | 2017-02-02 | 1 | -4/+4 |
| | | | | | | | | | | Issue #29300: Rename struct.unpack() second parameter from "inputstr" to "buffer", and use the Py_buffer type. Fix also unit tests on struct.unpack() which passed a Unicode string instead of a bytes string as struct.unpack() second parameter. The purpose of test_trailing_counter() is to test invalid format strings, not to test the buffer parameter. | ||||
* | Issue #29300: Convert _struct module to Argument Clinic | Victor Stinner | 2017-02-02 | 1 | -226/+246 |
| | | | | | | | | | | | | | | | | | | | | | | | | | * The struct module now requires contiguous buffers. * Convert most functions and methods of the _struct module to Argument Clinic * Use "Py_buffer" type for the "buffer" argument. Argument Clinic is responsible to create and release the Py_buffer object. * Use "PyStructObject *" type for self to avoid explicit conversions. * Add an unit test on the _struct.Struct.unpack_from() method to test passing arguments as keywords. * Rephrase docstrings. * Rename "fmt" argument to "format" in docstrings and the documentation. As a side effect, functions and methods which used METH_VARARGS calling convention like struct.pack() now use the METH_FASTCALL calling convention which avoids the creation of temporary tuple to pass positional arguments and so is faster. For example, struct.pack("i", 1) becomes 1.56x faster (-36%):: $ ./python -m perf timeit \ -s 'import struct; pack=struct.pack' 'pack("i", 1)' \ --compare-to=../default-ref/python Median +- std dev: 119 ns +- 1 ns -> 76.8 ns +- 0.4 ns: 1.56x faster (-36%) Significant (t=295.91) Patch co-written with Serhiy Storchaka. | ||||
* | Issue #28959: Added private macro PyDict_GET_SIZE for retrieving the size of ↵ | Serhiy Storchaka | 2016-12-16 | 1 | -1/+1 |
| | | | | dict. | ||||
* | Backed out changeset b9c9691c72c5 | Victor Stinner | 2016-12-04 | 1 | -1/+1 |
| | | | | | | Issue #28858: The change b9c9691c72c5 introduced a regression. It seems like _PyObject_CallArg1() uses more stack memory than PyObject_CallFunctionObjArgs(). | ||||
* | Replace PyObject_CallFunctionObjArgs() with fastcall | Victor Stinner | 2016-12-01 | 1 | -1/+1 |
| | | | | | | | | | | | | | | * PyObject_CallFunctionObjArgs(func, NULL) => _PyObject_CallNoArg(func) * PyObject_CallFunctionObjArgs(func, arg, NULL) => _PyObject_CallArg1(func, arg) PyObject_CallFunctionObjArgs() allocates 40 bytes on the C stack and requires extra work to "parse" C arguments to build a C array of PyObject*. _PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate memory on the C stack. This change is part of the fastcall project. The change on listsort() is related to the issue #23507. | ||||
* | Closes #21124, #28337: Call PyType_Ready on unpackiter_type. | Zachary Ware | 2016-10-04 | 1 | -0/+3 |
| | | | | Patch by Masayuki Yamamoto. | ||||
* | Issue #21124: Fix building _struct on Cygwin. | Zachary Ware | 2016-10-02 | 1 | -1/+1 |
| | | | | Patch by Masayuki Yamamoto. | ||||
* | merge 3.5 (#28184) | Benjamin Peterson | 2016-09-20 | 1 | -1/+1 |
|\ | |||||
* | | require C99 bool | Benjamin Peterson | 2016-09-07 | 1 | -12/+5 |
| | | |||||
* | | replace PY_LONG_LONG with long long | Benjamin Peterson | 2016-09-06 | 1 | -26/+26 |
| | | |||||
* | | require a long long data type (closes #27961) | Benjamin Peterson | 2016-09-06 | 1 | -43/+0 |
| | | |||||
* | | Issue #11734: Add support for IEEE 754 half-precision floats to the struct ↵ | Mark Dickinson | 2016-09-03 | 1 | -1/+75 |
| | | | | | | | | module. Original patch by Eli Stevens. | ||||
* | | merge heads | Gregory P. Smith | 2016-04-15 | 1 | -8/+8 |
|\ \ | |/ | |||||
| * | Issue #26535: Correct docs regarding the struct buffer size | Martin Panter | 2016-04-15 | 1 | -8/+8 |
| | | |||||
* | | Issue #22570: Renamed Py_SETREF to Py_XSETREF. | Serhiy Storchaka | 2016-04-06 | 1 | -1/+1 |
|\ \ | |/ | |||||
| * | Issue #22570: Renamed Py_SETREF to Py_XSETREF. | Serhiy Storchaka | 2016-04-06 | 1 | -1/+1 |
| | | |||||
* | | Issue #20440: Applied yet one patch for using Py_SETREF. | Serhiy Storchaka | 2015-12-27 | 1 | -2/+1 |
|\ \ | |/ | | | | | The patch is automatically generated, it replaces the code that uses Py_CLEAR. | ||||
| * | Issue #20440: Applied yet one patch for using Py_SETREF. | Serhiy Storchaka | 2015-12-27 | 1 | -2/+1 |
| | | | | | | | | The patch is automatically generated, it replaces the code that uses Py_CLEAR. | ||||
* | | Issue #25923: Added more const qualifiers to signatures of static and ↵ | Serhiy Storchaka | 2015-12-25 | 1 | -3/+3 |
| | | | | | | | | private functions. | ||||
* | | Issue #25923: Added the const qualifier to static constant arrays. | Serhiy Storchaka | 2015-12-25 | 1 | -2/+2 |
|/ | |||||
* | Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size. | Serhiy Storchaka | 2015-12-19 | 1 | -1/+1 |
| | | | | | This allows sys.getsize() to work correctly with their subclasses with __slots__ defined. | ||||
* | Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer() | Serhiy Storchaka | 2015-02-02 | 1 | -10/+13 |
|\ | | | | | | | and PyObject_AsWriteBuffer(). | ||||
| * | Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer() | Serhiy Storchaka | 2015-02-02 | 1 | -10/+13 |
| | | | | | | | | and PyObject_AsWriteBuffer(). | ||||
* | | Issue #22156: Fix some "comparison between signed and unsigned integers" | Victor Stinner | 2014-08-15 | 1 | -2/+3 |
| | | | | | | | | compiler warnings in the Modules/ subdirectory. | ||||
* | | Issue #21490: Add new C macros: Py_ABS() and Py_STRINGIFY() | Victor Stinner | 2014-05-14 | 1 | -5/+4 |
|/ | | | | | Keep _Py_STRINGIZE() in PC/pyconfig.h to not introduce a dependency between pyconfig.h and pymacros.h. | ||||
* | - Modules/_struct.c (unpackiter_type): Define static. | doko@ubuntu.com | 2013-11-23 | 1 | -1/+1 |
| | |||||
* | Issue #18783: Removed existing mentions of Python long type in docstrings, | Serhiy Storchaka | 2013-08-27 | 1 | -1/+1 |
|\ | | | | | | | error messages and comments. | ||||
| * | Issue #18783: Removed existing mentions of Python long type in docstrings, | Serhiy Storchaka | 2013-08-27 | 1 | -1/+1 |
| | | | | | | | | error messages and comments. | ||||
* | | Issue #14596: The struct.Struct() objects now use more compact implementation. | Serhiy Storchaka | 2013-05-17 | 1 | -79/+94 |
| | | |||||
* | | Issue #17804: New function ``struct.iter_unpack`` allows for streaming ↵ | Antoine Pitrou | 2013-04-26 | 1 | -0/+165 |
| | | | | | | | | struct unpacking. | ||||
* | | Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) ↵ | Antoine Pitrou | 2013-02-09 | 1 | -2/+2 |
|\ \ | |/ | | | | | | | | | | | | | in the interpreter. I've left a couple of them in: zlib (third-party lib), getaddrinfo.c (doesn't include Python.h, and probably obsolete), _sre.c (legitimate use for the re.LOCALE flag), mpdecimal (needs to build without Python.h). | ||||
| * | Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) ↵ | Antoine Pitrou | 2013-02-09 | 1 | -2/+2 |
| |\ | | | | | | | | | | | | | | | | | | | | | | in the interpreter. I've left a couple of them in: zlib (third-party lib), getaddrinfo.c (doesn't include Python.h, and probably obsolete), _sre.c (legitimate use for the re.LOCALE flag), mpdecimal (needs to build without Python.h). | ||||
| | * | Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) ↵ | Antoine Pitrou | 2013-02-09 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | | | | | | | | | | in the interpreter. I've left a couple of them in: zlib (third-party lib), getaddrinfo.c (doesn't include Python.h, and probably obsolete), _sre.c (legitimate use for the re.LOCALE flag). | ||||
* | | | #14897: Enhance error messages of struct.pack and struct.pack_into | Petri Lehtinen | 2012-10-29 | 1 | -4/+14 |
|\ \ \ | |/ / | | | | | | | Patch by Matti Mäki. | ||||
| * | | #14897: Enhance error messages of struct.pack and struct.pack_into | Petri Lehtinen | 2012-10-29 | 1 | -4/+14 |
| |\ \ | | |/ | | | | | | | Patch by Matti Mäki. | ||||
| | * | #14897: Enhance error messages of struct.pack and struct.pack_into | Petri Lehtinen | 2012-10-29 | 1 | -4/+14 |
| | | | | | | | | | | | | Patch by Matti Mäki. | ||||
* | | | Issue #16166: Add PY_LITTLE_ENDIAN and PY_BIG_ENDIAN macros and unified | Christian Heimes | 2012-10-17 | 1 | -11/+10 |
|/ / | | | | | | | endianess detection and handling. | ||||
* | | Issue #15402: Simplify Struct.__sizeof__ and make tests more precise. | Meador Inge | 2012-07-29 | 1 | -6/+2 |
|\ \ | |/ | |||||
| * | Issue #15402: Simplify Struct.__sizeof__ and make tests more precise. | Meador Inge | 2012-07-29 | 1 | -6/+2 |
| | | |||||
* | | Issue #15402: Add a __sizeof__ method to struct.Struct. | Meador Inge | 2012-07-23 | 1 | -0/+17 |
|\ \ | |/ | | | | | Initial patch by Serhiy Storchaka. | ||||
| * | Issue #15402: Add a __sizeof__ method to struct.Struct. | Meador Inge | 2012-07-23 | 1 | -0/+17 |
| | | | | | | | | Initial patch by Serhiy Storchaka. | ||||
* | | Issue #3163: The struct module gets new format characters 'n' and 'N' | Antoine Pitrou | 2011-10-06 | 1 | -1/+89 |
|/ | | | | supporting C integer types `ssize_t` and `size_t`, respectively. | ||||
* | #11515: Merge with 3.1. | Ezio Melotti | 2011-03-15 | 1 | -1/+1 |
|\ | |||||
| * | #11515: fix several typos. Patch by Piotr Kasprzyk. | Ezio Melotti | 2011-03-15 | 1 | -1/+1 |
| | | |||||
| * | Merged revisions 83239 via svnmerge from | Mark Dickinson | 2010-07-29 | 1 | -0/+3 |
| | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83239 | mark.dickinson | 2010-07-29 22:41:59 +0100 (Thu, 29 Jul 2010) | 2 lines Issue #9422: Fix memory leak when re-initializing a struct.Struct object. ........ |