History log of /external/python/cpython2/Include/stringobject.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6a8163a928f9ff04242580c09216431ddd39cdbc 15-Apr-2016 Martin Panter <vadmium+py@gmail.com> Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc

This affects documentation and code comments.
/external/python/cpython2/Include/stringobject.h
aca19e6a740c424aec243a4721b18d12e9129aa7 22-Apr-2009 Eric Smith <eric@trueblade.com> Backport of some of the work in r71665 to trunk. This reworks much of
int, long, and float __format__(), and it keeps their implementation
in sync with py3k.

Also added PyOS_double_to_string. This is the "fallback" version
that's also available in trunk, and should be kept in sync with that
code. I'll add an issue to document PyOS_double_to_string in the C
API.

There are many internal cleanups. Externally visible changes include:

- Implement PEP 378, Format Specifier for Thousands Separator, for
floats, ints, and longs.

- Issue #5515: 'n' formatting for ints, longs, and floats handles
leading zero formatting poorly.

- Issue #5772: For float.__format__, don't add a trailing ".0" if
we're using no type code and we have an exponent.
/external/python/cpython2/Include/stringobject.h
65fe47b9319e20cebf02d34f8abdbcda96d2fa22 24-Jun-2008 Eric Smith <eric@trueblade.com> Modified interface to _Py_[String|Unicode]InsertThousandsGrouping, in anticipation of fixing issue 3140.
/external/python/cpython2/Include/stringobject.h
e0b9261a2fecb05e12ccf7bc139ebc31c03d4325 11-Jun-2008 Gregory P. Smith <greg@mad-scientist.com> swap stringobject.h and bytesobject.h contents to make sense. PyString in
stringobject and PyBytes defines in bytesobject.
/external/python/cpython2/Include/stringobject.h
dd96db63f689e2f0d8ae5a1436b3b3395eec7de5 09-Jun-2008 Gregory P. Smith <greg@mad-scientist.com> This reverts r63675 based on the discussion in this thread:

http://mail.python.org/pipermail/python-dev/2008-June/079988.html

Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names
in the spirit of 3.0 are available via a #define only. See the email thread.
/external/python/cpython2/Include/stringobject.h
593daf545bd9b7e7bcb27b498ecc6f36db9ae395 26-May-2008 Christian Heimes <christian@cheimes.de> Renamed PyString to PyBytes
/external/python/cpython2/Include/stringobject.h
3497f9447633b0a60a0b42ba06f2246805b20bb9 26-May-2008 Christian Heimes <christian@cheimes.de> First step of the C API rename:
renamed Include/bytesobject.h to Include/bytearrayobject.h
renamed Include/stringobject.h to Include/bytesobject.h
added Include/stringobject.h with aliases
/external/python/cpython2/Include/stringobject.h
cf537ff39ea1a518e937ee607bce816e8f3f41b6 11-May-2008 Eric Smith <eric@trueblade.com> Addresses issue 2802: 'n' formatting for integers.

Adds 'n' as a format specifier for integers, to mirror the same
specifier which is already available for floats. 'n' is the same as
'd', but inserts the current locale-specific thousands grouping.

I added this as a stringlib function, but it's only used by str type,
not unicode. This is because of an implementation detail in
unicode.format(), which does its own str->unicode conversion. But the
unicode version will be needed in 3.0, and it may be needed by other
code eventually in 2.6 (maybe decimal?), so I left it as a stringlib
implementation. As long as the unicode version isn't instantiated,
there's no overhead for this.
/external/python/cpython2/Include/stringobject.h
e93237dfcc4ee4feee62adafb4e7899487ca864b 19-Dec-2007 Christian Heimes <christian@cheimes.de> #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available.
/external/python/cpython2/Include/stringobject.h
6819210b9e4e5719a6f7f9c1725f8fa70a8936f6 21-Jul-2007 Martin v. Löwis <martin@v.loewis.de> PEP 3123: Provide forward compatibility with Python 3.0, while keeping
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
/external/python/cpython2/Include/stringobject.h
ee3a1b5244e60566c5d5c8f6a1ea4b381de99f1c 25-Feb-2007 Neal Norwitz <nnorwitz@gmail.com> Variation of patch # 1624059 to speed up checking if an object is a subclass
of some of the common builtin types.

Use a bit in tp_flags for each common builtin type. Check the bit
to determine if any instance is a subclass of these common types.
The check avoids a function call and O(n) search of the base classes.
The check is done in the various Py*_Check macros rather than calling
PyType_IsSubtype().

All the bits are set in tp_flags when the type is declared
in the Objects/*object.c files because PyType_Ready() is not called
for all the types. Should PyType_Ready() be called for all types?
If so and the change is made, the changes to the Objects/*object.c files
can be reverted (remove setting the tp_flags). Objects/typeobject.c
would also have to be modified to add conditions
for Py*_CheckExact() in addition to each the PyType_IsSubtype check.
/external/python/cpython2/Include/stringobject.h
18e165558b24d29e7e0ca501842b9236589b012a 15-Feb-2006 Martin v. Löwis <martin@v.loewis.de> Merge ssize_t branch.
/external/python/cpython2/Include/stringobject.h
89a39461bff04b80bb4857790350e1ab30ff2df9 28-Oct-2004 Armin Rigo <arigo@tunes.org> Wrote down the invariants of some common objects whose structure is
exposed in header files. Fixed a few comments in these headers.

As we might have expected, writing down invariants systematically exposed a
(minor) bug. In this case, function objects have a writeable func_code
attribute, which could be set to code objects with the wrong number of
free variables. Calling the resulting function segfaulted the interpreter.
Added a corresponding test.
/external/python/cpython2/Include/stringobject.h
21d896cfa1646a1da4e0ead57db9defc2ade397c 01-Jul-2003 Neal Norwitz <nnorwitz@gmail.com> Use appropriate macros not the deprecated DL_IMPORT/DL_EXPORT macros
/external/python/cpython2/Include/stringobject.h
96aa0acef021f77d6e5b861201ccd952aa6f6469 15-Sep-2002 Neil Schemenauer <nascheme@enme.ucalgary.ca> Use Py_GCC_ATTRIBUTE instead of __attribute__. Compilers other than GCC
might use __attribute__ in other ways (e.g. CodeWarrior).
/external/python/cpython2/Include/stringobject.h
45ec02aed14685c353e55841b5acbc0dadee76f8 19-Aug-2002 Guido van Rossum <guido@python.org> SF patch 576101, by Oren Tirosh: alternative implementation of
interning. I modified Oren's patch significantly, but the basic idea
and most of the implementation is unchanged. Interned strings created
with PyString_InternInPlace() are now mortal, and you must keep a
reference to the resulting string around; use the new function
PyString_InternImmortal() to create immortal interned strings.
/external/python/cpython2/Include/stringobject.h
8a8da798a5a35bb387575d696799be29c4eaa0d3 14-Aug-2002 Martin v. Löwis <martin@v.loewis.de> Patch #505705: Remove eval in pickle and cPickle.
/external/python/cpython2/Include/stringobject.h
91a681debf9ffec155d0aff8a0bb5f965f592e16 12-Aug-2002 Mark Hammond <mhammond@skippinet.com.au> Excise DL_EXPORT from Include.

Thanks to Skip Montanaro and Kalle Svensson for the patches.
/external/python/cpython2/Include/stringobject.h
cacfc07d083286e80b6f86939d466e186f7ea3c0 24-May-2002 Guido van Rossum <guido@python.org> - A new type object, 'string', is added. This is a common base type
for 'str' and 'unicode', and can be used instead of
types.StringTypes, e.g. to test whether something is "a string":
isinstance(x, string) is True for Unicode and 8-bit strings. This
is an abstract base class and cannot be instantiated directly.
/external/python/cpython2/Include/stringobject.h
1f7df3595a0ddc5ef545d686bbb2933b11b7c8ce 29-Mar-2002 Tim Peters <tim.peters@gmail.com> Remove the CACHE_HASH and INTERN_STRINGS preprocessor symbols.
/external/python/cpython2/Include/stringobject.h
90b689076a6dcb55dcac6c5efbc9e4aa793e6c72 23-Oct-2001 Neil Schemenauer <nascheme@enme.ucalgary.ca> Add function attributes that allow GCC to check the arguments of printf-like
functions.
/external/python/cpython2/Include/stringobject.h
5a49ade70e19a76aa252cd596accf79930765f31 11-Sep-2001 Tim Peters <tim.peters@gmail.com> More on SF bug [#460020] bug or feature: unicode() and subclasses.
Repaired str(i) to return a genuine string when i is an instance of a str
subclass. New PyString_CheckExact() macro.
/external/python/cpython2/Include/stringobject.h
5eef77a21be8a7895419cc84e8bf5554ca908b54 30-Aug-2001 Guido van Rossum <guido@python.org> Make the Py<type>_Check() macro use PyObject_TypeCheck().
/external/python/cpython2/Include/stringobject.h
dadace004b4b94dcc4437bafc9c8407fbb1bed74 24-Aug-2001 Barry Warsaw <barry@python.org> PyString_FromFormat() and PyString_FromFormatV(): Largely ripped from
PyErr_Format() these new C API methods can be used instead of
sprintf()'s into hardcoded char* buffers. This allows us to fix
many situation where long package, module, or class names get
truncated in reprs.

PyString_FromFormat() is the varargs variety.
PyString_FromFormatV() is the va_list variety

Original PyErr_Format() code was modified to allow %p and %ld
expansions.

Many reprs were converted to this, checkins coming soo. Not
changed: complex_repr(), float_repr(), float_print(), float_str(),
int_repr(). There may be other candidates not yet converted.

Closes patch #454743.
/external/python/cpython2/Include/stringobject.h
a7259597f1f9ef389012010d7b8a02ebcf7396e7 16-Jun-2001 Tim Peters <tim.peters@gmail.com> SF bug 433228: repr(list) woes when len(list) big.
Gave Python linear-time repr() implementations for dicts, lists, strings.
This means, e.g., that repr(range(50000)) is no longer 50x slower than
pprint.pprint() in 2.2 <wink>.

I don't consider this a bugfix candidate, as it's a performance boost.

Added _PyString_Join() to the internal string API. If we want that in the
public API, fine, but then it requires runtime error checks instead of
asserts.
/external/python/cpython2/Include/stringobject.h
cd35306a25ef4a7c67edc50f0cec0af5a4b7ea41 24-May-2001 Martin v. Löwis <martin@v.loewis.de> Patch #424335: Implement string_richcompare, remove string_compare.
Use new _PyString_Eq in lookdict_string.
/external/python/cpython2/Include/stringobject.h
2d9204199fe8913cca9890f1822413d981587ee5 15-May-2001 Marc-André Lemburg <mal@egenix.com> This patch changes the way the string .encode() method works slightly
and introduces a new method .decode().

The major change is that strg.encode() will no longer try to convert
Unicode returns from the codec into a string, but instead pass along
the Unicode object as-is. The same is now true for all other codec
return types. The underlying C APIs were changed accordingly.

Note that even though this does have the potential of breaking
existing code, the chances are low since conversion from Unicode
previously took place using the default encoding which is normally
set to ASCII rendering this auto-conversion mechanism useless for
most Unicode encodings.

The good news is that you can now use .encode() and .decode() with
much greater ease and that the door was opened for better accessibility
of the builtin codecs.

As demonstration of the new feature, the patch includes a few new
codecs which allow string to string encoding and decoding (rot13,
hex, zip, uu, base64).

Written by Marc-Andre Lemburg. Copyright assigned to the PSF.
/external/python/cpython2/Include/stringobject.h
a903ad9855947ae885c4407be8d10ef8d5521010 23-Feb-2001 Barry Warsaw <barry@python.org> _Py_ReleaseInternedStrings(): Private API function to decref and
release the interned string dictionary. This is useful for memory
use debugging because it eliminates a huge source of noise from the
reports. Only defined when INTERN_STRINGS is defined.
/external/python/cpython2/Include/stringobject.h
38fd5b641366eedc74e4be3a0e4d2210f3bcdb5a 21-Sep-2000 Tim Peters <tim.peters@gmail.com> Derived from Martin's SF patch 110609: support unbounded ints in %d,i,u,x,X,o formats.
Note a curious extension to the std C rules: x, X and o formatting can never produce
a sign character in C, so the '+' and ' ' flags are meaningless for them. But
unbounded ints *can* produce a sign character under these conversions (no fixed-
width bitstring is wide enough to hold all negative values in 2's-comp form). So
these flags become meaningful in Python when formatting a Python long which is too
big to fit in a C long. This required shuffling around existing code, which hacked
x and X conversions to death when both the '#' and '0' flags were specified: the
hacks weren't strong enough to deal with the simultaneous possibility of the ' ' or
'+' flags too, since signs were always meaningless before for x and X conversions.
Isomorphic shuffling was required in unicodeobject.c.
Also added dozens of non-trivial new unbounded-int test cases to test_format.py.
/external/python/cpython2/Include/stringobject.h
d1ba443206b535f41154f10b9d56d4fc76a1a9d8 19-Sep-2000 Marc-André Lemburg <mal@egenix.com> This patch adds a new Python C API called PyString_AsStringAndSize()
which implements the automatic conversion from Unicode to a string
object using the default encoding.

The new API is then put to use to have eval() and exec accept
Unicode objects as code parameter. This closes bugs #110924
and #113890.

As side-effect, the traditional C APIs PyString_Size() and
PyString_AsString() will also accept Unicode objects as
parameters.
/external/python/cpython2/Include/stringobject.h
8586991099e4ace18ee94163a96b8ea1bed77ebe 02-Sep-2000 Guido van Rossum <guido@python.org> REMOVED all CWI, CNRI and BeOpen copyright markings.
This should match the situation in the 1.6b1 tree.
/external/python/cpython2/Include/stringobject.h
3cf4d2b3ea93eee40d34b1ae4845497d0cd3fcec 09-Jul-2000 Fred Drake <fdrake@acm.org> ANSI-fication and Py_PROTO extermination.
/external/python/cpython2/Include/stringobject.h
3d1a1d7f0c56fc9e25806d559ef08963d88022db 06-Jul-2000 Marc-André Lemburg <mal@egenix.com> Added prototypes for the new codec APIs for strings. These APIs
match the ones in the Unicode implementation, but were extended
to be able to reuse the existing Unicode codecs for string
purposes too.

Conversion from string to Unicode and back are done using the
default encoding.
/external/python/cpython2/Include/stringobject.h
ffcc3813d82e6b96db79f518f4e67b940a13ce64 01-Jul-2000 Guido van Rossum <guido@python.org> Change copyright notice - 2nd try.
/external/python/cpython2/Include/stringobject.h
fd71b9e9d496caa510dec56a9b69966558d6ba5d 01-Jul-2000 Guido van Rossum <guido@python.org> Change copyright notice.
/external/python/cpython2/Include/stringobject.h
43466ec7b07de6bcad016bec60839cd6079c5a9c 04-Dec-1998 Guido van Rossum <guido@python.org> Add DL_IMPORT(returntype) for all officially exported functions.
/external/python/cpython2/Include/stringobject.h
1e6e9a23688129b5b29fb8e8137f17617d22f483 18-Jan-1997 Guido van Rossum <guido@python.org> Two speedup hacks. Caching the hash saves recalculation of a string's
hash value. Interning strings (which requires hash caching) tries to
ensure that only one string object with a given value exists, so
equality tests are one pointer comparison. Together, these can speed
the interpreter up by as much as 20%. Each costs the size of a long
or pointer per string object. In addition, interned strings live
until the end of times. If you are concerned about memory footprint,
simply comment the #define out here (and rebuild everything!).
/external/python/cpython2/Include/stringobject.h
accfb849f9a92e094617de4ff42a7b61ff2f265e 06-Jan-1997 Barry Warsaw <barry@python.org> added PyString_GET_SIZE macro

for both PyString_GET_SIZE and PyString_AS_STRING, cast first argument
to a PyStringObject*
/external/python/cpython2/Include/stringobject.h
067998f35ec3013e9a55aad29f0e3dbe4560d11c 10-Dec-1996 Guido van Rossum <guido@python.org> Add const to error and newstring functions
/external/python/cpython2/Include/stringobject.h
d266eb460e20ded087d01a29da0a230e235afc40 25-Oct-1996 Guido van Rossum <guido@python.org> New permission notice, includes CNRI.
/external/python/cpython2/Include/stringobject.h
fdebf257055f7fe1a3381544df1eded7092b646f 30-Jul-1996 Guido van Rossum <guido@python.org> Turn on CACHE_HASH, for 2% speedier dict lookups
/external/python/cpython2/Include/stringobject.h
051ab123b465685e714668099c0a6dd86de5673b 27-Feb-1995 Guido van Rossum <guido@python.org> make the type a parameter of the DL_IMPORT macro, for Borland C
/external/python/cpython2/Include/stringobject.h
938178283c29cdc2c8f5004d58dff110ac907883 17-Jan-1995 Guido van Rossum <guido@python.org> new names for lots of new functions
/external/python/cpython2/Include/stringobject.h
caa63808861d4e92d4dc1005fc01de0f2e4a8fd0 12-Jan-1995 Guido van Rossum <guido@python.org> The great renaming, phase two: all header files have been updated to
use the new names exclusively, and the linker will see the new names.
Files that import "Python.h" also only see the new names. Files that
import "allobjects.h" will continue to be able to use the old names,
due to the inclusion (in allobjects.h) of "rename2.h".
/external/python/cpython2/Include/stringobject.h
5799b520086129ed8aaadeb3b941b3000a42576a 04-Jan-1995 Guido van Rossum <guido@python.org> Added 1995 copyright.
object.h: made sizes and refcnts signed ints.
stringobject.h: make getstrsize() signed int.
methodobject.h: add METH_VARARGS and METH_FREENAME flag bit definitions.
/external/python/cpython2/Include/stringobject.h
e89bc75048d0142859379b2b92e77d984fdbef6e 18-Aug-1994 Guido van Rossum <guido@python.org> Changes for dynamic linking under NT
/external/python/cpython2/Include/stringobject.h
b6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af 01-Aug-1994 Guido van Rossum <guido@python.org> Merge alpha100 branch back to main trunk
/external/python/cpython2/Include/stringobject.h
3bb8a05947fb67ed827dd1e8d7c0a982a1ff989e 22-Oct-1993 Sjoerd Mullender <sjoerd@acm.org> Several optimizations and speed improvements.
cstubs: Use Matrix type instead of float[4][4].
/external/python/cpython2/Include/stringobject.h
a3309960a50dbadfd854299e7420223eb8718a56 28-Jul-1993 Guido van Rossum <guido@python.org> * Added support for X11 modules.
* Makefile: change location of FORMS library.
* posixmodule.c: turn #if 0 into #ifdef MSDOS (stuff in unistd.h or not)
* Almost all .h files: added CPP magic to avoid duplicate inclusions and
to support inclusion from C++.
/external/python/cpython2/Include/stringobject.h
e537240c252ff678d49451ee6f80fa934653a724 16-Mar-1993 Guido van Rossum <guido@python.org> * Changed many files to use mkvalue() instead of newtupleobject().
* Fixcprt.py: added [-y file] option, do only files younger than file.
* modsupport.[ch]: added vmkvalue().
* intobject.c: use mkvalue().
* stringobject.c: added "formatstring"; renamed string* to string_*;
ceval.c: call formatstring for string % value.
* longobject.c: close memory leak in divmod.
* parsetok.c: set result node to NULL when returning an error.
/external/python/cpython2/Include/stringobject.h
5113f5fd346c32c98ac46d374e0b5c3dced289a6 05-Apr-1992 Guido van Rossum <guido@python.org> Copyright for 1992 added
/external/python/cpython2/Include/stringobject.h
f70e43a073b36c6f6e9894c01025243a77a452d4 19-Feb-1991 Guido van Rossum <guido@python.org> Added copyright notice.
/external/python/cpython2/Include/stringobject.h
85a5fbbdfea617f6cc8fae82c9e8c2b5c424436d 14-Oct-1990 Guido van Rossum <guido@python.org> Initial revision
/external/python/cpython2/Include/stringobject.h