aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Objects/stringlib/find_max_char.h
Commit message (Collapse)AuthorAge
* gh-120196: Reuse find_max_char() for bytes objects (#120497)Ruben Vorderman2024-06-17
|
* bpo-43179: Generalise alignment for optimised string routines (GH-24624)Jessica Clarke2021-03-31
| | | | | | | | | | | | | | | | | | | | | | | | | * Remove m68k-specific hack from ascii_decode On m68k, alignments of primitives is more relaxed, with 4-byte and 8-byte types only requiring 2-byte alignment, thus using sizeof(size_t) does not work. Instead, use the portable alternative. Note that this is a minimal fix that only relaxes the assertion and the condition for when to use the optimised version remains overly strict. Such issues will be fixed tree-wide in the next commit. NB: In C11 we could use _Alignof(size_t) instead, but for compatibility we use autoconf. * Optimise string routines for architectures with non-natural alignment C only requires that sizeof(x) is a multiple of alignof(x), not that the two are equal. Thus anywhere where we optimise based on alignment we should be using alignof(x) not sizeof(x). This is more annoying than it would be in C11 where we could just use _Alignof(x) (and alignof(x) in C++11), but since we still require only C99 we must plumb the information all the way from autoconf through the various typedefs and defines.
* bpo-38252: Use 8-byte step to detect ASCII sequence in 64bit Windows build ↵Ma Lin2020-10-18
| | | | (GH-16334)
* closes bpo-39605: Fix some casts to not cast away const. (GH-18453)Andy Lester2020-02-11
| | | | | | | | | | | | | | | gcc -Wcast-qual turns up a number of instances of casting away constness of pointers. Some of these can be safely modified, by either: Adding the const to the type cast, as in: - return _PyUnicode_FromUCS1((unsigned char*)s, size); + return _PyUnicode_FromUCS1((const unsigned char*)s, size); or, Removing the cast entirely, because it's not necessary (but probably was at one time), as in: - PyDTrace_FUNCTION_ENTRY((char *)filename, (char *)funcname, lineno); + PyDTrace_FUNCTION_ENTRY(filename, funcname, lineno); These changes will not change code, but they will make it much easier to check for errors in consts
* Issue #26765: Ensure that bytes- and unicode-specific stringlib files are usedSerhiy Storchaka2016-05-16
| | | | with correct type.
* Issue #18722: Remove uses of the "register" keyword in C code.Antoine Pitrou2013-08-13
|
* Issue #15144: Fix possible integer overflow when handling pointers as ↵Antoine Pitrou2012-09-20
| | | | | | integer values, by using Py_uintptr_t instead of size_t. Patch by Serhiy Storchaka.
* Use correct types for ASCII_CHAR_MASK integer constants.Mark Dickinson2012-07-07
|
* Issue #13155: Optimize finding the optimal character width of an unicode stringAntoine Pitrou2011-10-13