Mercurial > cpython-lru_cache-weakref
annotate Include/bytesobject.h @ 58973:db86bf39ccaa legacy-trunk
Issue 7970: When email.Parser.Parser parses a MIME message of type
message/rfc822 it turns it into an object whose body consists of
a list containing a single Message object. HeaderParser, on the
other hand, just copies the body as a string. Generator.flatten
has a special handler for the message mime type that expected the
body to be the one item list. This fails if the message was parsed
by HeaderParser. So we now check to see if the body is a string
first, and if so just we just emit it.
| author | R. David Murray <rdmurray@bitdance.com> |
|---|---|
| date | Sun, 21 Feb 2010 04:23:00 +0000 |
| parents | 154948e2fd1c |
| children |
| rev | line source |
|---|---|
|
47578
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
1 #define PyBytesObject PyStringObject |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
2 #define PyBytes_Type PyString_Type |
|
33856
60c60dc75c77
Wrote down the invariants of some common objects whose structure is
Armin Rigo <arigo@tunes.org>
parents:
29726
diff
changeset
|
3 |
|
47578
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
4 #define PyBytes_Check PyString_Check |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
5 #define PyBytes_CheckExact PyString_CheckExact |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
6 #define PyBytes_CHECK_INTERNED PyString_CHECK_INTERNED |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
7 #define PyBytes_AS_STRING PyString_AS_STRING |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
8 #define PyBytes_GET_SIZE PyString_GET_SIZE |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
9 #define Py_TPFLAGS_BYTES_SUBCLASS Py_TPFLAGS_STRING_SUBCLASS |
|
13376
bfe22cf6e770
Added prototypes for the new codec APIs for strings. These APIs
Marc-André Lemburg <mal@egenix.com>
parents:
13256
diff
changeset
|
10 |
|
47578
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
11 #define PyBytes_FromStringAndSize PyString_FromStringAndSize |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
12 #define PyBytes_FromString PyString_FromString |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
13 #define PyBytes_FromFormatV PyString_FromFormatV |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
14 #define PyBytes_FromFormat PyString_FromFormat |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
15 #define PyBytes_Size PyString_Size |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
16 #define PyBytes_AsString PyString_AsString |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
17 #define PyBytes_Repr PyString_Repr |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
18 #define PyBytes_Concat PyString_Concat |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
19 #define PyBytes_ConcatAndDel PyString_ConcatAndDel |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
20 #define _PyBytes_Resize _PyString_Resize |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
21 #define _PyBytes_Eq _PyString_Eq |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
22 #define PyBytes_Format PyString_Format |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
23 #define _PyBytes_FormatLong _PyString_FormatLong |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
24 #define PyBytes_DecodeEscape PyString_DecodeEscape |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
25 #define _PyBytes_Join _PyString_Join |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
26 #define PyBytes_AsStringAndSize PyString_AsStringAndSize |
|
acddb00b1de5
swap stringobject.h and bytesobject.h contents to make sense. PyString in
Gregory P. Smith <greg@mad-scientist.com>
parents:
47527
diff
changeset
|
27 #define _PyBytes_InsertThousandsGrouping _PyString_InsertThousandsGrouping |
