Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/python3....
File: codecs.h
#ifndef Py_CODECREGISTRY_H
[0] Fix | Delete
#define Py_CODECREGISTRY_H
[1] Fix | Delete
#ifdef __cplusplus
[2] Fix | Delete
extern "C" {
[3] Fix | Delete
#endif
[4] Fix | Delete
[5] Fix | Delete
/* ------------------------------------------------------------------------
[6] Fix | Delete
[7] Fix | Delete
Python Codec Registry and support functions
[8] Fix | Delete
[9] Fix | Delete
[10] Fix | Delete
Written by Marc-Andre Lemburg (mal@lemburg.com).
[11] Fix | Delete
[12] Fix | Delete
Copyright (c) Corporation for National Research Initiatives.
[13] Fix | Delete
[14] Fix | Delete
------------------------------------------------------------------------ */
[15] Fix | Delete
[16] Fix | Delete
/* Register a new codec search function.
[17] Fix | Delete
[18] Fix | Delete
As side effect, this tries to load the encodings package, if not
[19] Fix | Delete
yet done, to make sure that it is always first in the list of
[20] Fix | Delete
search functions.
[21] Fix | Delete
[22] Fix | Delete
The search_function's refcount is incremented by this function. */
[23] Fix | Delete
[24] Fix | Delete
PyAPI_FUNC(int) PyCodec_Register(
[25] Fix | Delete
PyObject *search_function
[26] Fix | Delete
);
[27] Fix | Delete
[28] Fix | Delete
/* Codec registry lookup API.
[29] Fix | Delete
[30] Fix | Delete
Looks up the given encoding and returns a CodecInfo object with
[31] Fix | Delete
function attributes which implement the different aspects of
[32] Fix | Delete
processing the encoding.
[33] Fix | Delete
[34] Fix | Delete
The encoding string is looked up converted to all lower-case
[35] Fix | Delete
characters. This makes encodings looked up through this mechanism
[36] Fix | Delete
effectively case-insensitive.
[37] Fix | Delete
[38] Fix | Delete
If no codec is found, a KeyError is set and NULL returned.
[39] Fix | Delete
[40] Fix | Delete
As side effect, this tries to load the encodings package, if not
[41] Fix | Delete
yet done. This is part of the lazy load strategy for the encodings
[42] Fix | Delete
package.
[43] Fix | Delete
[44] Fix | Delete
*/
[45] Fix | Delete
[46] Fix | Delete
#ifndef Py_LIMITED_API
[47] Fix | Delete
PyAPI_FUNC(PyObject *) _PyCodec_Lookup(
[48] Fix | Delete
const char *encoding
[49] Fix | Delete
);
[50] Fix | Delete
[51] Fix | Delete
PyAPI_FUNC(int) _PyCodec_Forget(
[52] Fix | Delete
const char *encoding
[53] Fix | Delete
);
[54] Fix | Delete
#endif
[55] Fix | Delete
[56] Fix | Delete
/* Codec registry encoding check API.
[57] Fix | Delete
[58] Fix | Delete
Returns 1/0 depending on whether there is a registered codec for
[59] Fix | Delete
the given encoding.
[60] Fix | Delete
[61] Fix | Delete
*/
[62] Fix | Delete
[63] Fix | Delete
PyAPI_FUNC(int) PyCodec_KnownEncoding(
[64] Fix | Delete
const char *encoding
[65] Fix | Delete
);
[66] Fix | Delete
[67] Fix | Delete
/* Generic codec based encoding API.
[68] Fix | Delete
[69] Fix | Delete
object is passed through the encoder function found for the given
[70] Fix | Delete
encoding using the error handling method defined by errors. errors
[71] Fix | Delete
may be NULL to use the default method defined for the codec.
[72] Fix | Delete
[73] Fix | Delete
Raises a LookupError in case no encoder can be found.
[74] Fix | Delete
[75] Fix | Delete
*/
[76] Fix | Delete
[77] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_Encode(
[78] Fix | Delete
PyObject *object,
[79] Fix | Delete
const char *encoding,
[80] Fix | Delete
const char *errors
[81] Fix | Delete
);
[82] Fix | Delete
[83] Fix | Delete
/* Generic codec based decoding API.
[84] Fix | Delete
[85] Fix | Delete
object is passed through the decoder function found for the given
[86] Fix | Delete
encoding using the error handling method defined by errors. errors
[87] Fix | Delete
may be NULL to use the default method defined for the codec.
[88] Fix | Delete
[89] Fix | Delete
Raises a LookupError in case no encoder can be found.
[90] Fix | Delete
[91] Fix | Delete
*/
[92] Fix | Delete
[93] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_Decode(
[94] Fix | Delete
PyObject *object,
[95] Fix | Delete
const char *encoding,
[96] Fix | Delete
const char *errors
[97] Fix | Delete
);
[98] Fix | Delete
[99] Fix | Delete
#ifndef Py_LIMITED_API
[100] Fix | Delete
/* Text codec specific encoding and decoding API.
[101] Fix | Delete
[102] Fix | Delete
Checks the encoding against a list of codecs which do not
[103] Fix | Delete
implement a str<->bytes encoding before attempting the
[104] Fix | Delete
operation.
[105] Fix | Delete
[106] Fix | Delete
Please note that these APIs are internal and should not
[107] Fix | Delete
be used in Python C extensions.
[108] Fix | Delete
[109] Fix | Delete
XXX (ncoghlan): should we make these, or something like them, public
[110] Fix | Delete
in Python 3.5+?
[111] Fix | Delete
[112] Fix | Delete
*/
[113] Fix | Delete
PyAPI_FUNC(PyObject *) _PyCodec_LookupTextEncoding(
[114] Fix | Delete
const char *encoding,
[115] Fix | Delete
const char *alternate_command
[116] Fix | Delete
);
[117] Fix | Delete
[118] Fix | Delete
PyAPI_FUNC(PyObject *) _PyCodec_EncodeText(
[119] Fix | Delete
PyObject *object,
[120] Fix | Delete
const char *encoding,
[121] Fix | Delete
const char *errors
[122] Fix | Delete
);
[123] Fix | Delete
[124] Fix | Delete
PyAPI_FUNC(PyObject *) _PyCodec_DecodeText(
[125] Fix | Delete
PyObject *object,
[126] Fix | Delete
const char *encoding,
[127] Fix | Delete
const char *errors
[128] Fix | Delete
);
[129] Fix | Delete
[130] Fix | Delete
/* These two aren't actually text encoding specific, but _io.TextIOWrapper
[131] Fix | Delete
* is the only current API consumer.
[132] Fix | Delete
*/
[133] Fix | Delete
PyAPI_FUNC(PyObject *) _PyCodecInfo_GetIncrementalDecoder(
[134] Fix | Delete
PyObject *codec_info,
[135] Fix | Delete
const char *errors
[136] Fix | Delete
);
[137] Fix | Delete
[138] Fix | Delete
PyAPI_FUNC(PyObject *) _PyCodecInfo_GetIncrementalEncoder(
[139] Fix | Delete
PyObject *codec_info,
[140] Fix | Delete
const char *errors
[141] Fix | Delete
);
[142] Fix | Delete
#endif
[143] Fix | Delete
[144] Fix | Delete
[145] Fix | Delete
[146] Fix | Delete
/* --- Codec Lookup APIs --------------------------------------------------
[147] Fix | Delete
[148] Fix | Delete
All APIs return a codec object with incremented refcount and are
[149] Fix | Delete
based on _PyCodec_Lookup(). The same comments w/r to the encoding
[150] Fix | Delete
name also apply to these APIs.
[151] Fix | Delete
[152] Fix | Delete
*/
[153] Fix | Delete
[154] Fix | Delete
/* Get an encoder function for the given encoding. */
[155] Fix | Delete
[156] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_Encoder(
[157] Fix | Delete
const char *encoding
[158] Fix | Delete
);
[159] Fix | Delete
[160] Fix | Delete
/* Get a decoder function for the given encoding. */
[161] Fix | Delete
[162] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_Decoder(
[163] Fix | Delete
const char *encoding
[164] Fix | Delete
);
[165] Fix | Delete
[166] Fix | Delete
/* Get an IncrementalEncoder object for the given encoding. */
[167] Fix | Delete
[168] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_IncrementalEncoder(
[169] Fix | Delete
const char *encoding,
[170] Fix | Delete
const char *errors
[171] Fix | Delete
);
[172] Fix | Delete
[173] Fix | Delete
/* Get an IncrementalDecoder object function for the given encoding. */
[174] Fix | Delete
[175] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_IncrementalDecoder(
[176] Fix | Delete
const char *encoding,
[177] Fix | Delete
const char *errors
[178] Fix | Delete
);
[179] Fix | Delete
[180] Fix | Delete
/* Get a StreamReader factory function for the given encoding. */
[181] Fix | Delete
[182] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_StreamReader(
[183] Fix | Delete
const char *encoding,
[184] Fix | Delete
PyObject *stream,
[185] Fix | Delete
const char *errors
[186] Fix | Delete
);
[187] Fix | Delete
[188] Fix | Delete
/* Get a StreamWriter factory function for the given encoding. */
[189] Fix | Delete
[190] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_StreamWriter(
[191] Fix | Delete
const char *encoding,
[192] Fix | Delete
PyObject *stream,
[193] Fix | Delete
const char *errors
[194] Fix | Delete
);
[195] Fix | Delete
[196] Fix | Delete
/* Unicode encoding error handling callback registry API */
[197] Fix | Delete
[198] Fix | Delete
/* Register the error handling callback function error under the given
[199] Fix | Delete
name. This function will be called by the codec when it encounters
[200] Fix | Delete
unencodable characters/undecodable bytes and doesn't know the
[201] Fix | Delete
callback name, when name is specified as the error parameter
[202] Fix | Delete
in the call to the encode/decode function.
[203] Fix | Delete
Return 0 on success, -1 on error */
[204] Fix | Delete
PyAPI_FUNC(int) PyCodec_RegisterError(const char *name, PyObject *error);
[205] Fix | Delete
[206] Fix | Delete
/* Lookup the error handling callback function registered under the given
[207] Fix | Delete
name. As a special case NULL can be passed, in which case
[208] Fix | Delete
the error handling callback for "strict" will be returned. */
[209] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_LookupError(const char *name);
[210] Fix | Delete
[211] Fix | Delete
/* raise exc as an exception */
[212] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_StrictErrors(PyObject *exc);
[213] Fix | Delete
[214] Fix | Delete
/* ignore the unicode error, skipping the faulty input */
[215] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_IgnoreErrors(PyObject *exc);
[216] Fix | Delete
[217] Fix | Delete
/* replace the unicode encode error with ? or U+FFFD */
[218] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_ReplaceErrors(PyObject *exc);
[219] Fix | Delete
[220] Fix | Delete
/* replace the unicode encode error with XML character references */
[221] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_XMLCharRefReplaceErrors(PyObject *exc);
[222] Fix | Delete
[223] Fix | Delete
/* replace the unicode encode error with backslash escapes (\x, \u and \U) */
[224] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_BackslashReplaceErrors(PyObject *exc);
[225] Fix | Delete
[226] Fix | Delete
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
[227] Fix | Delete
/* replace the unicode encode error with backslash escapes (\N, \x, \u and \U) */
[228] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_NameReplaceErrors(PyObject *exc);
[229] Fix | Delete
#endif
[230] Fix | Delete
[231] Fix | Delete
#ifndef Py_LIMITED_API
[232] Fix | Delete
PyAPI_DATA(const char *) Py_hexdigits;
[233] Fix | Delete
#endif
[234] Fix | Delete
[235] Fix | Delete
#ifdef __cplusplus
[236] Fix | Delete
}
[237] Fix | Delete
#endif
[238] Fix | Delete
#endif /* !Py_CODECREGISTRY_H */
[239] Fix | Delete
[240] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function