summaryrefslogtreecommitdiffstats
path: root/Include/bytesobject.h
Commit message (Collapse)AuthorAgeFilesLines
* Simplify and optimize formatlong()Victor Stinner2012-04-271-2/+0
| | | | | | | * Remove _PyBytes_FormatLong(): inline it into formatlong() * the input type is always a long, so remove the code for bool * don't duplicate the string if the length does not change * Use PyUnicode_DATA() instead of _PyUnicode_AsString()
* Merge branches/pep-0384.Martin v. Löwis2010-12-031-1/+10
|
* make hashes always the size of pointers; introduce Py_hash_t #9778Benjamin Peterson2010-10-171-1/+1
|
* The other half of Issue #1580: use short float repr where possible.Eric Smith2009-04-161-14/+12
| | | | | | | | | | | | | | Addresses the float -> string conversion, using David Gay's code which was added in Mark Dickinson's checkin r71663. Also addresses these, which are intertwined with the short repr changes: - Issue #5772: format(1e100, '<') produces '1e+100', not '1.0e+100' - Issue #5515: 'n' formatting with commas no longer works poorly with leading zeros. - PEP 378 Format Specifier for Thousands Separator: implemented for floats.
* Added ',' thousands grouping to int.__format__. See PEP 378.Eric Smith2009-04-031-1/+13
| | | | | | | | | This is incomplete, but I want to get some version into the next alpha. I am still working on: Documentation. More tests. Implement for floats. In addition, there's an existing bug with 'n' formatting that carries forward to thousands grouping (issue 5515).
* make bytes(o) respect __bytes__ #2415Benjamin Peterson2008-08-261-0/+1
| | | | | | This adds two new C-API functions: PyObject_Bytes and PyBytes_FromObject. Reviewer: Barry
* Merged revisions 64491 via svnmerge fromEric Smith2008-06-241-2/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r64491 | eric.smith | 2008-06-23 20:42:10 -0400 (Mon, 23 Jun 2008) | 1 line Modified interface to _Py_[String|Unicode]InsertThousandsGrouping, in anticipation of fixing issue 3140. ........
* Merged revisions ↵Georg Brandl2008-06-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 63829-63831,63858,63865,63879,63882,63948,63970-63972,63976,63989,64014-64015,64021-64022,64063-64065,64067 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r63829 | mark.summerfield | 2008-05-31 15:05:34 +0200 (Sat, 31 May 2008) | 4 lines Added a note to [] that special forms & special chars lose their meaning and backrefs can't be used inside [] ........ r63830 | georg.brandl | 2008-05-31 16:40:09 +0200 (Sat, 31 May 2008) | 2 lines #3010: clarification about stdin/use_rawinput. ........ r63831 | georg.brandl | 2008-05-31 16:45:55 +0200 (Sat, 31 May 2008) | 2 lines #3005: add explaining sentence to easydialogs docs. ........ r63858 | georg.brandl | 2008-06-01 18:41:31 +0200 (Sun, 01 Jun 2008) | 2 lines Add plain text make target. ........ r63865 | georg.brandl | 2008-06-01 21:24:36 +0200 (Sun, 01 Jun 2008) | 2 lines Spaces vs. tabs. ........ r63879 | gregory.p.smith | 2008-06-02 00:57:47 +0200 (Mon, 02 Jun 2008) | 3 lines Make the _H #define's match the header file names. Fix comments to mention the correct type names. ........ r63882 | gregory.p.smith | 2008-06-02 01:48:47 +0200 (Mon, 02 Jun 2008) | 3 lines Adds a Thread.getIdent() method to provide the _get_ident() value for any given threading.Thread object. feature request issue 2871. ........ r63948 | alexandre.vassalotti | 2008-06-04 22:41:44 +0200 (Wed, 04 Jun 2008) | 2 lines Fixed complex.__getnewargs__() to not emit another complex object. ........ r63970 | andrew.kuchling | 2008-06-06 01:33:54 +0200 (Fri, 06 Jun 2008) | 1 line Document 'utc' parameter ........ r63971 | andrew.kuchling | 2008-06-06 01:35:31 +0200 (Fri, 06 Jun 2008) | 1 line Add various items ........ r63972 | andrew.kuchling | 2008-06-06 01:35:48 +0200 (Fri, 06 Jun 2008) | 1 line Grammar fix ........ r63976 | georg.brandl | 2008-06-06 09:34:50 +0200 (Fri, 06 Jun 2008) | 2 lines Markup fix. ........ r63989 | thomas.heller | 2008-06-06 20:42:11 +0200 (Fri, 06 Jun 2008) | 2 lines Add a reminder for the maintainer of whatsnew. ........ r64014 | georg.brandl | 2008-06-07 17:59:10 +0200 (Sat, 07 Jun 2008) | 3 lines Factor out docstring dedenting from inspect.getdoc() into inspect.cleandoc() to ease standalone use of the algorithm. ........ r64015 | georg.brandl | 2008-06-07 18:04:01 +0200 (Sat, 07 Jun 2008) | 2 lines Revert unwanted changes. ........ r64021 | georg.brandl | 2008-06-07 20:16:12 +0200 (Sat, 07 Jun 2008) | 2 lines X-ref to numbers module. ........ r64022 | georg.brandl | 2008-06-07 20:17:37 +0200 (Sat, 07 Jun 2008) | 3 lines Document the "st" API, to avoid confusion with the "new" AST. Add a note about using the new AST module. ........ r64063 | martin.v.loewis | 2008-06-10 07:03:35 +0200 (Tue, 10 Jun 2008) | 2 lines Add Gregor Lingl. ........ r64064 | georg.brandl | 2008-06-10 09:45:28 +0200 (Tue, 10 Jun 2008) | 2 lines Add the "ast" module, containing helpers to ease use of the "_ast" classes. ........ r64065 | raymond.hettinger | 2008-06-10 09:57:15 +0200 (Tue, 10 Jun 2008) | 1 line Add Arnaud for his efforts on multi-arg set operations. ........ r64067 | georg.brandl | 2008-06-10 14:46:39 +0200 (Tue, 10 Jun 2008) | 2 lines #2536: fix itertools.permutations and itertools.combinations docstrings. ........
* remove PyBytes_Format from headerBenjamin Peterson2008-05-261-1/+0
|
* Renamed files bytesobject.[ch] and stringobject.[ch]Christian Heimes2008-05-261-40/+98
| | | | Fixed Windows build
* Renamed PyBytes to PyByteArrayChristian Heimes2008-05-261-14/+14
|
* #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT.Christian Heimes2007-12-191-2/+2
|
* Added all PyTypeObjects to the appropriate header files.Christian Heimes2007-11-291-0/+1
| | | | Before the patch a lot of internal types weren't available in the header files. The patch exposes the new iterators, views and some other types to all C modules. I've also renamed some of the types and tp_names.
* Fix typo in commentNeal Norwitz2007-08-251-1/+1
|
* Code review of the new buffer protocol. Mostly add questions that shouldNeal Norwitz2007-08-191-0/+1
| | | | | | | | | | | be answered with the comments removed. There are many places that require checks when doing arithmetic for memory sizes when allocating memory. Otherwise, overflow is possible with a subsequent crash. Fix SF #1777057 which was a result of not initializing the new BufferError properly. Had to update the test for exceptions for BufferError too.
* Merged in py3k-buffer branch to main line. All objects now use the buffer ↵Travis E. Oliphant2007-08-181-0/+1
| | | | protocol in PEP 3118.
* Fix merge breakage.Martin v. Löwis2007-07-211-1/+1
|
* Merged revisions 56467-56482 via svnmerge fromMartin v. Löwis2007-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/p3yk ................ r56477 | martin.v.loewis | 2007-07-21 09:04:38 +0200 (Sa, 21 Jul 2007) | 11 lines Merged revisions 56466-56476 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r56476 | martin.v.loewis | 2007-07-21 08:55:02 +0200 (Sa, 21 Jul 2007) | 4 lines PEP 3123: Provide forward compatibility with Python 3.0, while keeping backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT. ........ ................ r56478 | martin.v.loewis | 2007-07-21 09:47:23 +0200 (Sa, 21 Jul 2007) | 2 lines PEP 3123: Use proper C inheritance for PyObject. ................ r56479 | martin.v.loewis | 2007-07-21 10:06:55 +0200 (Sa, 21 Jul 2007) | 3 lines Add longintrepr.h to Python.h, so that the compiler can see that PyFalse is really some kind of PyObject*. ................ r56480 | martin.v.loewis | 2007-07-21 10:47:18 +0200 (Sa, 21 Jul 2007) | 2 lines Qualify SHIFT, MASK, BASE. ................ r56482 | martin.v.loewis | 2007-07-21 19:10:57 +0200 (Sa, 21 Jul 2007) | 2 lines Correctly refer to _ob_next. ................
* Add asserts to PyBytes_AS_STRING and PyBytes_GET_SIZE.Guido van Rossum2007-06-141-2/+2
|
* Rough and dirty job -- allow concatenation of bytes and arbitraryGuido van Rossum2007-04-131-0/+1
| | | | | | buffer-supporting objects (Unicode always excluded), and also of str and bytes. (For some reason u"" + b"" doesn't fail, I'll investigate later.)
* Optimizations for bytes reallocation.Guido van Rossum2006-05-051-0/+1
| | | | | | | | | This uses up to 12.5% overallocation, not entirely unlike list_resize(). Could probably use more tweaks for odd allocation patterns, TBD. Also add __alloc__() method which returns the actually allocated size. PS. I'm now convinced that we need something like "".join(); later.
* Added much functionality to the bytes type.Guido van Rossum2006-04-241-2/+3
| | | | Change file.readinto() to require binary mode.
* Here is a bytes type. It's very minimal but it's a start.Guido van Rossum2006-04-221-0/+47