Back to index

python3.2  3.2.2
Classes | Defines | Typedefs | Functions | Variables
unicodeobject.h File Reference
#include <stdarg.h>
#include <ctype.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  PyUnicodeObject


#define PyUnicode_AsASCIIString   PyUnicodeUCS2_AsASCIIString
#define PyUnicode_AsCharmapString   PyUnicodeUCS2_AsCharmapString
#define PyUnicode_AsDecodedObject   PyUnicodeUCS2_AsDecodedObject
#define PyUnicode_AsDecodedUnicode   PyUnicodeUCS2_AsDecodedUnicode
#define PyUnicode_AsEncodedObject   PyUnicodeUCS2_AsEncodedObject
#define PyUnicode_AsEncodedString   PyUnicodeUCS2_AsEncodedString
#define PyUnicode_AsEncodedUnicode   PyUnicodeUCS2_AsEncodedUnicode
#define PyUnicode_AsLatin1String   PyUnicodeUCS2_AsLatin1String
#define PyUnicode_AsRawUnicodeEscapeString   PyUnicodeUCS2_AsRawUnicodeEscapeString
#define PyUnicode_AsUTF32String   PyUnicodeUCS2_AsUTF32String
#define PyUnicode_AsUTF16String   PyUnicodeUCS2_AsUTF16String
#define PyUnicode_AsUTF8String   PyUnicodeUCS2_AsUTF8String
#define PyUnicode_AsUnicode   PyUnicodeUCS2_AsUnicode
#define PyUnicode_AsUnicodeEscapeString   PyUnicodeUCS2_AsUnicodeEscapeString
#define PyUnicode_AsWideChar   PyUnicodeUCS2_AsWideChar
#define PyUnicode_AsWideCharString   PyUnicodeUCS2_AsWideCharString
#define PyUnicode_ClearFreeList   PyUnicodeUCS2_ClearFreelist
#define PyUnicode_Compare   PyUnicodeUCS2_Compare
#define PyUnicode_CompareWithASCIIString   PyUnicodeUCS2_CompareWithASCIIString
#define PyUnicode_Concat   PyUnicodeUCS2_Concat
#define PyUnicode_Append   PyUnicodeUCS2_Append
#define PyUnicode_AppendAndDel   PyUnicodeUCS2_AppendAndDel
#define PyUnicode_Contains   PyUnicodeUCS2_Contains
#define PyUnicode_Count   PyUnicodeUCS2_Count
#define PyUnicode_Decode   PyUnicodeUCS2_Decode
#define PyUnicode_DecodeASCII   PyUnicodeUCS2_DecodeASCII
#define PyUnicode_DecodeCharmap   PyUnicodeUCS2_DecodeCharmap
#define PyUnicode_DecodeLatin1   PyUnicodeUCS2_DecodeLatin1
#define PyUnicode_DecodeFSDefault   PyUnicodeUCS2_DecodeFSDefault
#define PyUnicode_DecodeFSDefaultAndSize   PyUnicodeUCS2_DecodeFSDefaultAndSize
#define PyUnicode_DecodeRawUnicodeEscape   PyUnicodeUCS2_DecodeRawUnicodeEscape
#define PyUnicode_DecodeUTF32   PyUnicodeUCS2_DecodeUTF32
#define PyUnicode_DecodeUTF32Stateful   PyUnicodeUCS2_DecodeUTF32Stateful
#define PyUnicode_DecodeUTF16   PyUnicodeUCS2_DecodeUTF16
#define PyUnicode_DecodeUTF16Stateful   PyUnicodeUCS2_DecodeUTF16Stateful
#define PyUnicode_DecodeUTF8   PyUnicodeUCS2_DecodeUTF8
#define PyUnicode_DecodeUTF8Stateful   PyUnicodeUCS2_DecodeUTF8Stateful
#define PyUnicode_DecodeUnicodeEscape   PyUnicodeUCS2_DecodeUnicodeEscape
#define PyUnicode_Encode   PyUnicodeUCS2_Encode
#define PyUnicode_EncodeASCII   PyUnicodeUCS2_EncodeASCII
#define PyUnicode_EncodeCharmap   PyUnicodeUCS2_EncodeCharmap
#define PyUnicode_EncodeDecimal   PyUnicodeUCS2_EncodeDecimal
#define PyUnicode_EncodeLatin1   PyUnicodeUCS2_EncodeLatin1
#define PyUnicode_EncodeRawUnicodeEscape   PyUnicodeUCS2_EncodeRawUnicodeEscape
#define PyUnicode_EncodeUTF32   PyUnicodeUCS2_EncodeUTF32
#define PyUnicode_EncodeUTF16   PyUnicodeUCS2_EncodeUTF16
#define PyUnicode_EncodeUTF8   PyUnicodeUCS2_EncodeUTF8
#define PyUnicode_EncodeUnicodeEscape   PyUnicodeUCS2_EncodeUnicodeEscape
#define PyUnicode_Find   PyUnicodeUCS2_Find
#define PyUnicode_Format   PyUnicodeUCS2_Format
#define PyUnicode_FromEncodedObject   PyUnicodeUCS2_FromEncodedObject
#define PyUnicode_FromFormat   PyUnicodeUCS2_FromFormat
#define PyUnicode_FromFormatV   PyUnicodeUCS2_FromFormatV
#define PyUnicode_FromObject   PyUnicodeUCS2_FromObject
#define PyUnicode_FromOrdinal   PyUnicodeUCS2_FromOrdinal
#define PyUnicode_FromString   PyUnicodeUCS2_FromString
#define PyUnicode_FromStringAndSize   PyUnicodeUCS2_FromStringAndSize
#define PyUnicode_FromUnicode   PyUnicodeUCS2_FromUnicode
#define PyUnicode_FromWideChar   PyUnicodeUCS2_FromWideChar
#define PyUnicode_FSConverter   PyUnicodeUCS2_FSConverter
#define PyUnicode_FSDecoder   PyUnicodeUCS2_FSDecoder
#define PyUnicode_GetDefaultEncoding   PyUnicodeUCS2_GetDefaultEncoding
#define PyUnicode_GetMax   PyUnicodeUCS2_GetMax
#define PyUnicode_GetSize   PyUnicodeUCS2_GetSize
#define PyUnicode_IsIdentifier   PyUnicodeUCS2_IsIdentifier
#define PyUnicode_Join   PyUnicodeUCS2_Join
#define PyUnicode_Partition   PyUnicodeUCS2_Partition
#define PyUnicode_RPartition   PyUnicodeUCS2_RPartition
#define PyUnicode_RSplit   PyUnicodeUCS2_RSplit
#define PyUnicode_Replace   PyUnicodeUCS2_Replace
#define PyUnicode_Resize   PyUnicodeUCS2_Resize
#define PyUnicode_RichCompare   PyUnicodeUCS2_RichCompare
#define PyUnicode_Split   PyUnicodeUCS2_Split
#define PyUnicode_Splitlines   PyUnicodeUCS2_Splitlines
#define PyUnicode_Tailmatch   PyUnicodeUCS2_Tailmatch
#define PyUnicode_Translate   PyUnicodeUCS2_Translate
#define PyUnicode_TranslateCharmap   PyUnicodeUCS2_TranslateCharmap
#define _PyUnicode_AsDefaultEncodedString   _PyUnicodeUCS2_AsDefaultEncodedString
#define _PyUnicode_Fini   _PyUnicodeUCS2_Fini
#define _PyUnicode_Init   _PyUnicodeUCS2_Init
#define PyUnicode_strdup   PyUnicodeUCS2_strdup
#define Py_UNICODE_ISSPACE(ch)   ((ch) < 128U ? _Py_ascii_whitespace[(ch)] : _PyUnicode_IsWhitespace(ch))
#define Py_UNICODE_ISLOWER(ch)   _PyUnicode_IsLowercase(ch)
#define Py_UNICODE_ISUPPER(ch)   _PyUnicode_IsUppercase(ch)
#define Py_UNICODE_ISTITLE(ch)   _PyUnicode_IsTitlecase(ch)
#define Py_UNICODE_ISLINEBREAK(ch)   _PyUnicode_IsLinebreak(ch)
#define Py_UNICODE_TOLOWER(ch)   _PyUnicode_ToLowercase(ch)
#define Py_UNICODE_TOUPPER(ch)   _PyUnicode_ToUppercase(ch)
#define Py_UNICODE_TOTITLE(ch)   _PyUnicode_ToTitlecase(ch)
#define Py_UNICODE_ISDECIMAL(ch)   _PyUnicode_IsDecimalDigit(ch)
#define Py_UNICODE_ISDIGIT(ch)   _PyUnicode_IsDigit(ch)
#define Py_UNICODE_ISNUMERIC(ch)   _PyUnicode_IsNumeric(ch)
#define Py_UNICODE_ISPRINTABLE(ch)   _PyUnicode_IsPrintable(ch)
#define Py_UNICODE_TODECIMAL(ch)   _PyUnicode_ToDecimalDigit(ch)
#define Py_UNICODE_TODIGIT(ch)   _PyUnicode_ToDigit(ch)
#define Py_UNICODE_TONUMERIC(ch)   _PyUnicode_ToNumeric(ch)
#define Py_UNICODE_ISALPHA(ch)   _PyUnicode_IsAlpha(ch)
#define Py_UNICODE_ISALNUM(ch)
#define Py_UNICODE_COPY(target, source, length)   Py_MEMCPY((target), (source), (length)*sizeof(Py_UNICODE))
#define Py_UNICODE_FILL(target, value, length)
#define Py_UNICODE_MATCH(string, offset, substring)
#define PyUnicode_Check(op)   PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_UNICODE_SUBCLASS)
#define PyUnicode_CheckExact(op)   (Py_TYPE(op) == &PyUnicode_Type)
#define PyUnicode_GET_SIZE(op)   (assert(PyUnicode_Check(op)),(((PyUnicodeObject *)(op))->length))
#define PyUnicode_GET_DATA_SIZE(op)   (assert(PyUnicode_Check(op)),(((PyUnicodeObject *)(op))->length * sizeof(Py_UNICODE)))
#define PyUnicode_AS_UNICODE(op)   (assert(PyUnicode_Check(op)),(((PyUnicodeObject *)(op))->str))
#define PyUnicode_AS_DATA(op)   (assert(PyUnicode_Check(op)),((const char *)((PyUnicodeObject *)(op))->str))
#define PyUnicode_CHECK_INTERNED(op)   (((PyUnicodeObject *)(op))->state)




 PyAPI_DATA (PyTypeObject) PyUnicode_Type
 PyAPI_FUNC (PyObject *) PyUnicode_FromUnicode(const Py_UNICODE *u
 PyAPI_FUNC (Py_UNICODE *) PyUnicode_AsUnicode(PyObject *unicode)
 PyAPI_FUNC (Py_ssize_t) PyUnicode_GetSize(PyObject *unicode)
 PyAPI_FUNC (Py_UNICODE) PyUnicode_GetMax(void)
 PyAPI_FUNC (void) PyUnicode_InternInPlace(PyObject **)
 PyAPI_FUNC (char *) _PyUnicode_AsStringAndSize(PyObject *unicode
 PyAPI_FUNC (const char *) PyUnicode_GetDefaultEncoding(void)
PyObject_PyUnicode_DecodeUnicodeInternal (const char *string, Py_ssize_t length, const char *errors)
 PyAPI_DATA (const unsigned char) _Py_ascii_whitespace[]
 PyAPI_FUNC (Py_UCS4) _PyUnicode_ToLowercase(Py_UCS4 ch)
 PyAPI_FUNC (double) _PyUnicode_ToNumeric(Py_UCS4 ch)
 PyAPI_FUNC (size_t) Py_UNICODE_strlen(const Py_UNICODE *u)


Py_ssize_t size
Py_ssize_t length
const char * encoding
const char const char * errors
va_list vargs
Py_UNICODE Py_ssize_t format_spec_len
Py_ssize_t const char Py_ssize_tconsumed
Py_ssize_t int base64SetO
Py_ssize_t int int base64WhiteSpace
Py_ssize_t const char intbyteorder
Py_ssize_t PyObjectmapping
Py_ssize_t PyObjecttable
Py_ssize_t char * output
PyObject Py_ssize_t maxsplit
int keepends
PyObject Py_ssize_t start
PyObject Py_ssize_t Py_ssize_t end
PyObject Py_ssize_t Py_ssize_t int direction
PyObject PyObjectreplstr
PyObject PyObject Py_ssize_t maxcount
PyObject int op
int striptype
int PyObjectsepobj
Py_ssize_t n_buffer
Py_ssize_t Py_UNICODEdigits
Py_ssize_t Py_UNICODE Py_ssize_t n_digits
Py_ssize_t Py_UNICODE
Py_ssize_t Py_ssize_t 
Py_ssize_t Py_UNICODE
Py_ssize_t Py_ssize_t const
char * 
Py_ssize_t Py_UNICODE
Py_ssize_t Py_ssize_t const
char const char * 
const Py_UNICODEs2
const Py_UNICODE size_t n

Class Documentation

struct PyUnicodeObject

Definition at line 377 of file unicodeobject.h.

Collaboration diagram for PyUnicodeObject:
Class Members
PyObject * defenc
Py_hash_t hash
PyObject_HEAD Py_ssize_t length
int state
Py_UNICODE * str

Define Documentation

#define _PyUnicode_AsDefaultEncodedString   _PyUnicodeUCS2_AsDefaultEncodedString

Definition at line 224 of file unicodeobject.h.

#define _PyUnicode_Fini   _PyUnicodeUCS2_Fini

Definition at line 225 of file unicodeobject.h.

#define _PyUnicode_Init   _PyUnicodeUCS2_Init

Definition at line 226 of file unicodeobject.h.

#define Py_UNICODE_COPY (   target,
)    Py_MEMCPY((target), (source), (length)*sizeof(Py_UNICODE))

Definition at line 353 of file unicodeobject.h.

#define Py_UNICODE_FILL (   target,
do {Py_ssize_t i_; Py_UNICODE *t_ = (target); Py_UNICODE v_ = (value);\
    for (i_ = 0; i_ < (length); i_++) t_[i_] = v_;\
    } while (0)

Definition at line 356 of file unicodeobject.h.

#define Py_UNICODE_ISALNUM (   ch)
    Py_UNICODE_ISDIGIT(ch) || \

Definition at line 347 of file unicodeobject.h.

#define Py_UNICODE_ISALPHA (   ch)    _PyUnicode_IsAlpha(ch)

Definition at line 345 of file unicodeobject.h.

#define Py_UNICODE_ISDECIMAL (   ch)    _PyUnicode_IsDecimalDigit(ch)

Definition at line 336 of file unicodeobject.h.

#define Py_UNICODE_ISDIGIT (   ch)    _PyUnicode_IsDigit(ch)

Definition at line 337 of file unicodeobject.h.

#define Py_UNICODE_ISLINEBREAK (   ch)    _PyUnicode_IsLinebreak(ch)

Definition at line 330 of file unicodeobject.h.

#define Py_UNICODE_ISLOWER (   ch)    _PyUnicode_IsLowercase(ch)

Definition at line 327 of file unicodeobject.h.

#define Py_UNICODE_ISNUMERIC (   ch)    _PyUnicode_IsNumeric(ch)

Definition at line 338 of file unicodeobject.h.

#define Py_UNICODE_ISPRINTABLE (   ch)    _PyUnicode_IsPrintable(ch)

Definition at line 339 of file unicodeobject.h.

#define Py_UNICODE_ISSPACE (   ch)    ((ch) < 128U ? _Py_ascii_whitespace[(ch)] : _PyUnicode_IsWhitespace(ch))

Definition at line 324 of file unicodeobject.h.

#define Py_UNICODE_ISTITLE (   ch)    _PyUnicode_IsTitlecase(ch)

Definition at line 329 of file unicodeobject.h.

#define Py_UNICODE_ISUPPER (   ch)    _PyUnicode_IsUppercase(ch)

Definition at line 328 of file unicodeobject.h.

#define Py_UNICODE_MATCH (   string,
((*((string)->str + (offset)) == *((substring)->str)) && \
    ((*((string)->str + (offset) + (substring)->length-1) == *((substring)->str + (substring)->length-1))) && \
     !memcmp((string)->str + (offset), (substring)->str, (substring)->length*sizeof(Py_UNICODE)))

Definition at line 364 of file unicodeobject.h.

Definition at line 421 of file unicodeobject.h.

#define Py_UNICODE_TODECIMAL (   ch)    _PyUnicode_ToDecimalDigit(ch)

Definition at line 341 of file unicodeobject.h.

#define Py_UNICODE_TODIGIT (   ch)    _PyUnicode_ToDigit(ch)

Definition at line 342 of file unicodeobject.h.

#define Py_UNICODE_TOLOWER (   ch)    _PyUnicode_ToLowercase(ch)

Definition at line 332 of file unicodeobject.h.

#define Py_UNICODE_TONUMERIC (   ch)    _PyUnicode_ToNumeric(ch)

Definition at line 343 of file unicodeobject.h.

#define Py_UNICODE_TOTITLE (   ch)    _PyUnicode_ToTitlecase(ch)

Definition at line 334 of file unicodeobject.h.

#define Py_UNICODE_TOUPPER (   ch)    _PyUnicode_ToUppercase(ch)

Definition at line 333 of file unicodeobject.h.

Definition at line 65 of file unicodeobject.h.

#define PyUnicode_Append   PyUnicodeUCS2_Append

Definition at line 167 of file unicodeobject.h.

#define PyUnicode_AppendAndDel   PyUnicodeUCS2_AppendAndDel

Definition at line 168 of file unicodeobject.h.

#define PyUnicode_AS_DATA (   op)    (assert(PyUnicode_Check(op)),((const char *)((PyUnicodeObject *)(op))->str))

Definition at line 410 of file unicodeobject.h.

Definition at line 408 of file unicodeobject.h.

#define PyUnicode_AsASCIIString   PyUnicodeUCS2_AsASCIIString

Definition at line 147 of file unicodeobject.h.

#define PyUnicode_AsCharmapString   PyUnicodeUCS2_AsCharmapString

Definition at line 148 of file unicodeobject.h.

#define PyUnicode_AsDecodedObject   PyUnicodeUCS2_AsDecodedObject

Definition at line 149 of file unicodeobject.h.

#define PyUnicode_AsDecodedUnicode   PyUnicodeUCS2_AsDecodedUnicode

Definition at line 150 of file unicodeobject.h.

#define PyUnicode_AsEncodedObject   PyUnicodeUCS2_AsEncodedObject

Definition at line 151 of file unicodeobject.h.

#define PyUnicode_AsEncodedString   PyUnicodeUCS2_AsEncodedString

Definition at line 152 of file unicodeobject.h.

#define PyUnicode_AsEncodedUnicode   PyUnicodeUCS2_AsEncodedUnicode

Definition at line 153 of file unicodeobject.h.

#define PyUnicode_AsLatin1String   PyUnicodeUCS2_AsLatin1String

Definition at line 154 of file unicodeobject.h.

#define PyUnicode_AsRawUnicodeEscapeString   PyUnicodeUCS2_AsRawUnicodeEscapeString

Definition at line 155 of file unicodeobject.h.

#define PyUnicode_AsUnicode   PyUnicodeUCS2_AsUnicode

Definition at line 159 of file unicodeobject.h.

#define PyUnicode_AsUnicodeEscapeString   PyUnicodeUCS2_AsUnicodeEscapeString

Definition at line 160 of file unicodeobject.h.

#define PyUnicode_AsUTF16String   PyUnicodeUCS2_AsUTF16String

Definition at line 157 of file unicodeobject.h.

#define PyUnicode_AsUTF32String   PyUnicodeUCS2_AsUTF32String

Definition at line 156 of file unicodeobject.h.

#define PyUnicode_AsUTF8String   PyUnicodeUCS2_AsUTF8String

Definition at line 158 of file unicodeobject.h.

#define PyUnicode_AsWideChar   PyUnicodeUCS2_AsWideChar

Definition at line 161 of file unicodeobject.h.

#define PyUnicode_AsWideCharString   PyUnicodeUCS2_AsWideCharString

Definition at line 162 of file unicodeobject.h.

Definition at line 398 of file unicodeobject.h.

#define PyUnicode_CHECK_INTERNED (   op)    (((PyUnicodeObject *)(op))->state)

Definition at line 562 of file unicodeobject.h.

#define PyUnicode_CheckExact (   op)    (Py_TYPE(op) == &PyUnicode_Type)

Definition at line 400 of file unicodeobject.h.

#define PyUnicode_ClearFreeList   PyUnicodeUCS2_ClearFreelist

Definition at line 163 of file unicodeobject.h.

#define PyUnicode_Compare   PyUnicodeUCS2_Compare

Definition at line 164 of file unicodeobject.h.

#define PyUnicode_CompareWithASCIIString   PyUnicodeUCS2_CompareWithASCIIString

Definition at line 165 of file unicodeobject.h.

#define PyUnicode_Concat   PyUnicodeUCS2_Concat

Definition at line 166 of file unicodeobject.h.

#define PyUnicode_Contains   PyUnicodeUCS2_Contains

Definition at line 169 of file unicodeobject.h.

#define PyUnicode_Count   PyUnicodeUCS2_Count

Definition at line 170 of file unicodeobject.h.

#define PyUnicode_Decode   PyUnicodeUCS2_Decode

Definition at line 171 of file unicodeobject.h.

#define PyUnicode_DecodeASCII   PyUnicodeUCS2_DecodeASCII

Definition at line 172 of file unicodeobject.h.

#define PyUnicode_DecodeCharmap   PyUnicodeUCS2_DecodeCharmap

Definition at line 173 of file unicodeobject.h.

#define PyUnicode_DecodeFSDefault   PyUnicodeUCS2_DecodeFSDefault

Definition at line 175 of file unicodeobject.h.

#define PyUnicode_DecodeFSDefaultAndSize   PyUnicodeUCS2_DecodeFSDefaultAndSize

Definition at line 176 of file unicodeobject.h.

#define PyUnicode_DecodeLatin1   PyUnicodeUCS2_DecodeLatin1

Definition at line 174 of file unicodeobject.h.

#define PyUnicode_DecodeRawUnicodeEscape   PyUnicodeUCS2_DecodeRawUnicodeEscape

Definition at line 177 of file unicodeobject.h.

#define PyUnicode_DecodeUnicodeEscape   PyUnicodeUCS2_DecodeUnicodeEscape

Definition at line 184 of file unicodeobject.h.

#define PyUnicode_DecodeUTF16   PyUnicodeUCS2_DecodeUTF16

Definition at line 180 of file unicodeobject.h.

#define PyUnicode_DecodeUTF16Stateful   PyUnicodeUCS2_DecodeUTF16Stateful

Definition at line 181 of file unicodeobject.h.

#define PyUnicode_DecodeUTF32   PyUnicodeUCS2_DecodeUTF32

Definition at line 178 of file unicodeobject.h.

#define PyUnicode_DecodeUTF32Stateful   PyUnicodeUCS2_DecodeUTF32Stateful

Definition at line 179 of file unicodeobject.h.

#define PyUnicode_DecodeUTF8   PyUnicodeUCS2_DecodeUTF8

Definition at line 182 of file unicodeobject.h.

#define PyUnicode_DecodeUTF8Stateful   PyUnicodeUCS2_DecodeUTF8Stateful

Definition at line 183 of file unicodeobject.h.

#define PyUnicode_Encode   PyUnicodeUCS2_Encode

Definition at line 185 of file unicodeobject.h.

#define PyUnicode_EncodeASCII   PyUnicodeUCS2_EncodeASCII

Definition at line 186 of file unicodeobject.h.

#define PyUnicode_EncodeCharmap   PyUnicodeUCS2_EncodeCharmap

Definition at line 187 of file unicodeobject.h.

#define PyUnicode_EncodeDecimal   PyUnicodeUCS2_EncodeDecimal

Definition at line 188 of file unicodeobject.h.

#define PyUnicode_EncodeLatin1   PyUnicodeUCS2_EncodeLatin1

Definition at line 189 of file unicodeobject.h.

#define PyUnicode_EncodeRawUnicodeEscape   PyUnicodeUCS2_EncodeRawUnicodeEscape

Definition at line 190 of file unicodeobject.h.

#define PyUnicode_EncodeUnicodeEscape   PyUnicodeUCS2_EncodeUnicodeEscape

Definition at line 194 of file unicodeobject.h.

#define PyUnicode_EncodeUTF16   PyUnicodeUCS2_EncodeUTF16

Definition at line 192 of file unicodeobject.h.

#define PyUnicode_EncodeUTF32   PyUnicodeUCS2_EncodeUTF32

Definition at line 191 of file unicodeobject.h.

#define PyUnicode_EncodeUTF8   PyUnicodeUCS2_EncodeUTF8

Definition at line 193 of file unicodeobject.h.

#define PyUnicode_Find   PyUnicodeUCS2_Find

Definition at line 195 of file unicodeobject.h.

#define PyUnicode_Format   PyUnicodeUCS2_Format

Definition at line 196 of file unicodeobject.h.

#define PyUnicode_FromEncodedObject   PyUnicodeUCS2_FromEncodedObject

Definition at line 197 of file unicodeobject.h.

#define PyUnicode_FromFormat   PyUnicodeUCS2_FromFormat

Definition at line 198 of file unicodeobject.h.

#define PyUnicode_FromFormatV   PyUnicodeUCS2_FromFormatV

Definition at line 199 of file unicodeobject.h.

#define PyUnicode_FromObject   PyUnicodeUCS2_FromObject

Definition at line 200 of file unicodeobject.h.

#define PyUnicode_FromOrdinal   PyUnicodeUCS2_FromOrdinal

Definition at line 201 of file unicodeobject.h.

#define PyUnicode_FromString   PyUnicodeUCS2_FromString

Definition at line 202 of file unicodeobject.h.

#define PyUnicode_FromStringAndSize   PyUnicodeUCS2_FromStringAndSize

Definition at line 203 of file unicodeobject.h.

#define PyUnicode_FromUnicode   PyUnicodeUCS2_FromUnicode

Definition at line 204 of file unicodeobject.h.

#define PyUnicode_FromWideChar   PyUnicodeUCS2_FromWideChar

Definition at line 205 of file unicodeobject.h.

#define PyUnicode_FSConverter   PyUnicodeUCS2_FSConverter

Definition at line 206 of file unicodeobject.h.

#define PyUnicode_FSDecoder   PyUnicodeUCS2_FSDecoder

Definition at line 207 of file unicodeobject.h.

#define PyUnicode_GET_DATA_SIZE (   op)    (assert(PyUnicode_Check(op)),(((PyUnicodeObject *)(op))->length * sizeof(Py_UNICODE)))

Definition at line 406 of file unicodeobject.h.

Definition at line 404 of file unicodeobject.h.

#define PyUnicode_GetDefaultEncoding   PyUnicodeUCS2_GetDefaultEncoding

Definition at line 208 of file unicodeobject.h.

#define PyUnicode_GetMax   PyUnicodeUCS2_GetMax

Definition at line 209 of file unicodeobject.h.

#define PyUnicode_GetSize   PyUnicodeUCS2_GetSize

Definition at line 210 of file unicodeobject.h.

#define PyUnicode_IsIdentifier   PyUnicodeUCS2_IsIdentifier

Definition at line 211 of file unicodeobject.h.

#define PyUnicode_Join   PyUnicodeUCS2_Join

Definition at line 212 of file unicodeobject.h.

#define PyUnicode_Partition   PyUnicodeUCS2_Partition

Definition at line 213 of file unicodeobject.h.

#define PyUnicode_Replace   PyUnicodeUCS2_Replace

Definition at line 216 of file unicodeobject.h.

#define PyUnicode_Resize   PyUnicodeUCS2_Resize

Definition at line 217 of file unicodeobject.h.

#define PyUnicode_RichCompare   PyUnicodeUCS2_RichCompare

Definition at line 218 of file unicodeobject.h.

#define PyUnicode_RPartition   PyUnicodeUCS2_RPartition

Definition at line 214 of file unicodeobject.h.

#define PyUnicode_RSplit   PyUnicodeUCS2_RSplit

Definition at line 215 of file unicodeobject.h.

#define PyUnicode_Split   PyUnicodeUCS2_Split

Definition at line 219 of file unicodeobject.h.

#define PyUnicode_Splitlines   PyUnicodeUCS2_Splitlines

Definition at line 220 of file unicodeobject.h.

#define PyUnicode_strdup   PyUnicodeUCS2_strdup

Definition at line 227 of file unicodeobject.h.

#define PyUnicode_Tailmatch   PyUnicodeUCS2_Tailmatch

Definition at line 221 of file unicodeobject.h.

#define PyUnicode_Translate   PyUnicodeUCS2_Translate

Definition at line 222 of file unicodeobject.h.

#define PyUnicode_TranslateCharmap   PyUnicodeUCS2_TranslateCharmap

Definition at line 223 of file unicodeobject.h.


Definition at line 396 of file unicodeobject.h.


Definition at line 395 of file unicodeobject.h.


Definition at line 394 of file unicodeobject.h.

Typedef Documentation

Definition at line 135 of file unicodeobject.h.

Function Documentation

PyObject* _PyUnicode_DecodeUnicodeInternal ( const char *  string,
Py_ssize_t  length,
const char *  errors 

Definition at line 4381 of file unicodeobject.c.

    const char *starts = s;
    Py_ssize_t startinpos;
    Py_ssize_t endinpos;
    Py_ssize_t outpos;
    PyUnicodeObject *v;
    Py_UNICODE *p;
    const char *end;
    const char *reason;
    PyObject *errorHandler = NULL;
    PyObject *exc = NULL;

    Py_UNICODE unimax = PyUnicode_GetMax();

    /* XXX overflow detection missing */
    v = _PyUnicode_New((size+Py_UNICODE_SIZE-1)/ Py_UNICODE_SIZE);
    if (v == NULL)
        goto onError;
    if (PyUnicode_GetSize((PyObject *)v) == 0)
        return (PyObject *)v;
    p = PyUnicode_AS_UNICODE(v);
    end = s + size;

    while (s < end) {
        memcpy(p, s, sizeof(Py_UNICODE));
        /* We have to sanity check the raw data, otherwise doom looms for
           some malformed UCS-4 data. */
        if (
            *p > unimax || *p < 0 ||
            end-s < Py_UNICODE_SIZE
            startinpos = s - starts;
            if (end-s < Py_UNICODE_SIZE) {
                endinpos = end-starts;
                reason = "truncated input";
            else {
                endinpos = s - starts + Py_UNICODE_SIZE;
                reason = "illegal code point (> 0x10FFFF)";
            outpos = p - PyUnicode_AS_UNICODE(v);
            if (unicode_decode_call_errorhandler(
                    errors, &errorHandler,
                    "unicode_internal", reason,
                    &starts, &end, &startinpos, &endinpos, &exc, &s,
                    &v, &outpos, &p)) {
                goto onError;
        else {
            s += Py_UNICODE_SIZE;

    if (_PyUnicode_Resize(&v, p - PyUnicode_AS_UNICODE(v)) < 0)
        goto onError;
    return (PyObject *)v;

    return NULL;

Here is the call graph for this function:

Here is the caller graph for this function:

PyAPI_DATA ( const unsigned  char)
PyAPI_FUNC ( PyObject ) const
PyAPI_FUNC ( Py_ssize_t  ) [read]

Definition at line 2410 of file pythonrun.c.

PyAPI_FUNC ( char *  )
PyAPI_FUNC ( const char *  )
PyAPI_FUNC ( double  )
PyAPI_FUNC ( size_t  ) const

Variable Documentation

Definition at line 1491 of file unicodeobject.h.

Definition at line 810 of file unicodeobject.h.

Definition at line 810 of file unicodeobject.h.

Definition at line 871 of file unicodeobject.h.

Definition at line 1657 of file unicodeobject.h.

Definition at line 802 of file unicodeobject.h.

Definition at line 1523 of file unicodeobject.h.

Definition at line 1412 of file unicodeobject.h.

Definition at line 1502 of file unicodeobject.h.

const char* encoding

Definition at line 514 of file unicodeobject.h.

Definition at line 1412 of file unicodeobject.h.

Definition at line 514 of file unicodeobject.h.

Definition at line 548 of file unicodeobject.h.

Definition at line 548 of file unicodeobject.h.

Definition at line 1534 of file unicodeobject.h.

Definition at line 1345 of file unicodeobject.h.

Definition at line 493 of file unicodeobject.h.

Definition at line 1122 of file unicodeobject.h.

Definition at line 1444 of file unicodeobject.h.

Definition at line 1333 of file unicodeobject.h.

Definition at line 1523 of file unicodeobject.h.

Definition at line 1640 of file unicodeobject.h.

Definition at line 1523 of file unicodeobject.h.

Definition at line 1523 of file unicodeobject.h.

Definition at line 1481 of file unicodeobject.h.

Definition at line 1224 of file unicodeobject.h.

Definition at line 1444 of file unicodeobject.h.

Definition at line 1302 of file unicodeobject.h.

Definition at line 1633 of file unicodeobject.h.

Definition at line 1333 of file unicodeobject.h.

Definition at line 1512 of file unicodeobject.h.

Definition at line 1405 of file unicodeobject.h.

Definition at line 441 of file unicodeobject.h.

Definition at line 1412 of file unicodeobject.h.

Definition at line 1512 of file unicodeobject.h.

Definition at line 1412 of file unicodeobject.h.

Definition at line 1160 of file unicodeobject.h.

Definition at line 1534 of file unicodeobject.h.

Definition at line 538 of file unicodeobject.h.