summaryrefslogtreecommitdiff
path: root/Cython/Utility/StringTools.c
Commit message (Collapse)AuthorAgeFilesLines
* replace generic "COMPILING_IN_*" C macros with feature specific guards that ↵Stefan Behnel2016-07-301-3/+3
| | | | allow a more fine-grained adaptation to C-API implementations
* fix typo in PyPy fallbackStefan Behnel2016-03-281-1/+1
|
* make sure f-string formatting always returns a Unicode string (even when not ↵Stefan Behnel2016-03-261-3/+9
| | | | joining the final result in trivial cases)
* fix repeated expression evaluation in f-string implementation for !s/r/a ↵Stefan Behnel2016-03-261-2/+10
| | | | conversions by switching from macro to inline function
* reduce string formatting overhead for the very likely case of str values in Py2Stefan Behnel2016-03-261-2/+7
|
* reduce string formatting overhead for the very likely case of integer valuesStefan Behnel2016-03-261-1/+11
|
* simplify code generated for f-string formatting using simple utility functionsStefan Behnel2016-03-221-0/+20
|
* avoid potentially unsafe downcastStefan Behnel2015-09-121-7/+3
|
* __Pyx_decode_c_string: check for overflow when calling strlen.Nikolaus Rath2015-09-121-2/+11
| | | | | | | Fixes http://trac.cython.org/ticket/864. --HG-- extra : amend_source : d2a97da4f942d555723b9bfa488985c5e5c27721
* Move "longintrepr.h" inclusion before any user includes.Robert Bradshaw2015-08-131-2/+1
| | | | | | | | This solves the issue reported by Volker Braun where conflicting using aliases of uint64_t would result in compile time errors. Unfortunately, this also means that it's always included if CYTHON_USE_PYLONG_INTERNALS is set, but it's a short header.
* move some utility code to the back of the fileStefan Behnel2015-07-071-3/+19
|
* cast PyUnicode_Tailmatch() "Py_ssize_t" result to int rather than ↵Stefan Behnel2015-07-071-15/+11
| | | | propagating its type throughout the code base
* Tailmatch functions return Py_ssize_t, not int.Robert Bradshaw2015-07-071-9/+12
|
* minor pypy code improvementsStefan Behnel2015-04-111-2/+2
|
* disambiguate utility code nameStefan Behnel2015-04-111-1/+1
|
* move StrEq() utility code to StringTools.cStefan Behnel2015-03-301-0/+12
|
* extend PyLong optimisations to larger negative numbers, enable it also in Py2.7Stefan Behnel2015-03-261-2/+1
|
* use generic "__Pyx_PyUnicode_READY()" macro instead of checking for PEP393 ↵Stefan Behnel2014-09-071-11/+3
| | | | all over the place
* refactor duplicated code in utility functionStefan Behnel2014-08-291-6/+5
|
* add missing utility code dependencyStefan Behnel2014-08-291-0/+1
|
* speed up appending integer values to bytearray objects in Py3Stefan Behnel2014-08-291-0/+14
|
* split internal method calling helper functions into specialised 0-, 1-, 2- ↵Stefan Behnel2014-08-211-1/+1
| | | | args versions to apply the method call optimisation to them
* Merge branch '0.20.x'Lisandro Dalcin2014-05-051-2/+2
|\
| * Silent clang -Wconversion warningsLisandro Dalcin2014-05-041-2/+2
| |
* | Restore some over-eager 3.1 removals.Robert Bradshaw2014-02-221-1/+6
| |
* | More obsolete code removal.Robert Bradshaw2014-02-221-6/+1
| |
* | Remove obsolete utility code.Robert Bradshaw2014-02-221-9/+0
|/
* add missing ";" in C codeStefan Behnel2014-02-131-1/+1
|
* add str comparison fallback to Py2 version of unicode comparisonStefan Behnel2014-01-101-0/+3
|
* optimise str == unicode / unicode == str in Py2Stefan Behnel2014-01-101-12/+49
|
* fix bytearray.append(ch) for non-ASCII 1-char strings in Py2 and extend testStefan Behnel2014-01-041-1/+1
|
* fix implicit integer downcast in __Pyx_PyByteArray_AppendObject() functionStefan Behnel2014-01-041-1/+6
|
* remove outdated commentStefan Behnel2014-01-041-1/+0
| | | | | --HG-- extra : rebase_source : 22e9602b4fa5ddfd4e9577610afe1635b482a86d
* handle Py2 compatibility case bytearray.append(pychar)Stefan Behnel2013-12-271-4/+33
| | | | | --HG-- extra : amend_source : f3b7f004f905c791e6ced2a5b27fffa21f9ceb08
* inline bytearray.append()Stefan Behnel2013-12-241-0/+33
|
* fix bytes.join() in Py<=2.5Stefan Behnel2013-12-071-1/+5
|
* also optimise basestring.join() since we now infer this type in a couple of ↵Stefan Behnel2013-12-071-0/+2
| | | | places
* optimise str/bytes.join() and infer the result type; improve type inference ↵Stefan Behnel2013-12-071-0/+24
| | | | for called builtins
* clean up lots of places where exceptions are being raised to reduce the ↵Stefan Behnel2013-12-061-1/+1
| | | | message building overhead
* inline PyUnicode_Compare() function for equality comparisonsStefan Behnel2013-11-101-4/+9
|
* optimise string equality comparison by always looking at the first character ↵Stefan Behnel2013-11-101-23/+20
| | | | | | | before calling into the C-API --HG-- extra : amend_source : 65f946184bc3b291289c54f6787aba7d2ad43b20
* replace some redundant utility functions by explicit exceptionsStefan Behnel2013-11-091-50/+3
|
* make fast path in Get/SetItemInt() utility functions safe for sizeof(index ↵Stefan Behnel2013-11-091-9/+9
| | | | type) >= sizeof(Py_ssize_t)
* fix copy&paste code in __Pyx_SetItemInt_ByteArray_Generic()Stefan Behnel2013-11-081-7/+10
|
* implement (and thus, fix) index assignments to bytearray objectsStefan Behnel2013-11-051-0/+45
|
* optimise indexing and slicing of bytearrayStefan Behnel2013-11-031-0/+43
|
* optimise bytearray.decode()Stefan Behnel2013-11-031-40/+38
| | | | | --HG-- rename : tests/run/bytesmethods.pyx => tests/run/bytearraymethods.pyx
* use constant flags to move wraparound/boundscheck evaluation into inlined ↵Stefan Behnel2013-03-021-12/+18
| | | | Get/Set/DelItemInt() utility functions
* move string related utility functions from Optimize.c and Optimize.py to ↵Stefan Behnel2013-02-231-0/+180
| | | | StringTools.c
* optimise 'x in unicode' a bitStefan Behnel2013-02-221-0/+8
|