Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include/python2....
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 register 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
PyAPI_FUNC(PyObject *) _PyCodec_Lookup(
[47] Fix | Delete
const char *encoding
[48] Fix | Delete
);
[49] Fix | Delete
[50] Fix | Delete
/* Generic codec based encoding API.
[51] Fix | Delete
[52] Fix | Delete
object is passed through the encoder function found for the given
[53] Fix | Delete
encoding using the error handling method defined by errors. errors
[54] Fix | Delete
may be NULL to use the default method defined for the codec.
[55] Fix | Delete
[56] Fix | Delete
Raises a LookupError in case no encoder can be found.
[57] Fix | Delete
[58] Fix | Delete
*/
[59] Fix | Delete
[60] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_Encode(
[61] Fix | Delete
PyObject *object,
[62] Fix | Delete
const char *encoding,
[63] Fix | Delete
const char *errors
[64] Fix | Delete
);
[65] Fix | Delete
[66] Fix | Delete
/* Generic codec based decoding API.
[67] Fix | Delete
[68] Fix | Delete
object is passed through the decoder function found for the given
[69] Fix | Delete
encoding using the error handling method defined by errors. errors
[70] Fix | Delete
may be NULL to use the default method defined for the codec.
[71] Fix | Delete
[72] Fix | Delete
Raises a LookupError in case no encoder can be found.
[73] Fix | Delete
[74] Fix | Delete
*/
[75] Fix | Delete
[76] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_Decode(
[77] Fix | Delete
PyObject *object,
[78] Fix | Delete
const char *encoding,
[79] Fix | Delete
const char *errors
[80] Fix | Delete
);
[81] Fix | Delete
[82] Fix | Delete
/* Text codec specific encoding and decoding API.
[83] Fix | Delete
[84] Fix | Delete
Checks the encoding against a list of codecs which do not
[85] Fix | Delete
implement a unicode<->bytes encoding before attempting the
[86] Fix | Delete
operation.
[87] Fix | Delete
[88] Fix | Delete
Please note that these APIs are internal and should not
[89] Fix | Delete
be used in Python C extensions.
[90] Fix | Delete
[91] Fix | Delete
XXX (ncoghlan): should we make these, or something like them, public
[92] Fix | Delete
in Python 3.5+?
[93] Fix | Delete
[94] Fix | Delete
*/
[95] Fix | Delete
PyAPI_FUNC(PyObject *) _PyCodec_LookupTextEncoding(
[96] Fix | Delete
const char *encoding,
[97] Fix | Delete
const char *alternate_command
[98] Fix | Delete
);
[99] Fix | Delete
[100] Fix | Delete
PyAPI_FUNC(PyObject *) _PyCodec_EncodeText(
[101] Fix | Delete
PyObject *object,
[102] Fix | Delete
const char *encoding,
[103] Fix | Delete
const char *errors
[104] Fix | Delete
);
[105] Fix | Delete
[106] Fix | Delete
PyAPI_FUNC(PyObject *) _PyCodec_DecodeText(
[107] Fix | Delete
PyObject *object,
[108] Fix | Delete
const char *encoding,
[109] Fix | Delete
const char *errors
[110] Fix | Delete
);
[111] Fix | Delete
[112] Fix | Delete
/* These two aren't actually text encoding specific, but _io.TextIOWrapper
[113] Fix | Delete
* is the only current API consumer.
[114] Fix | Delete
*/
[115] Fix | Delete
PyAPI_FUNC(PyObject *) _PyCodecInfo_GetIncrementalDecoder(
[116] Fix | Delete
PyObject *codec_info,
[117] Fix | Delete
const char *errors
[118] Fix | Delete
);
[119] Fix | Delete
[120] Fix | Delete
PyAPI_FUNC(PyObject *) _PyCodecInfo_GetIncrementalEncoder(
[121] Fix | Delete
PyObject *codec_info,
[122] Fix | Delete
const char *errors
[123] Fix | Delete
);
[124] Fix | Delete
[125] Fix | Delete
[126] Fix | Delete
[127] Fix | Delete
/* --- Codec Lookup APIs --------------------------------------------------
[128] Fix | Delete
[129] Fix | Delete
All APIs return a codec object with incremented refcount and are
[130] Fix | Delete
based on _PyCodec_Lookup(). The same comments w/r to the encoding
[131] Fix | Delete
name also apply to these APIs.
[132] Fix | Delete
[133] Fix | Delete
*/
[134] Fix | Delete
[135] Fix | Delete
/* Get an encoder function for the given encoding. */
[136] Fix | Delete
[137] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_Encoder(
[138] Fix | Delete
const char *encoding
[139] Fix | Delete
);
[140] Fix | Delete
[141] Fix | Delete
/* Get a decoder function for the given encoding. */
[142] Fix | Delete
[143] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_Decoder(
[144] Fix | Delete
const char *encoding
[145] Fix | Delete
);
[146] Fix | Delete
[147] Fix | Delete
/* Get an IncrementalEncoder object for the given encoding. */
[148] Fix | Delete
[149] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_IncrementalEncoder(
[150] Fix | Delete
const char *encoding,
[151] Fix | Delete
const char *errors
[152] Fix | Delete
);
[153] Fix | Delete
[154] Fix | Delete
/* Get an IncrementalDecoder object function for the given encoding. */
[155] Fix | Delete
[156] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_IncrementalDecoder(
[157] Fix | Delete
const char *encoding,
[158] Fix | Delete
const char *errors
[159] Fix | Delete
);
[160] Fix | Delete
[161] Fix | Delete
/* Get a StreamReader factory function for the given encoding. */
[162] Fix | Delete
[163] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_StreamReader(
[164] Fix | Delete
const char *encoding,
[165] Fix | Delete
PyObject *stream,
[166] Fix | Delete
const char *errors
[167] Fix | Delete
);
[168] Fix | Delete
[169] Fix | Delete
/* Get a StreamWriter factory function for the given encoding. */
[170] Fix | Delete
[171] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_StreamWriter(
[172] Fix | Delete
const char *encoding,
[173] Fix | Delete
PyObject *stream,
[174] Fix | Delete
const char *errors
[175] Fix | Delete
);
[176] Fix | Delete
[177] Fix | Delete
/* Unicode encoding error handling callback registry API */
[178] Fix | Delete
[179] Fix | Delete
/* Register the error handling callback function error under the given
[180] Fix | Delete
name. This function will be called by the codec when it encounters
[181] Fix | Delete
unencodable characters/undecodable bytes and doesn't know the
[182] Fix | Delete
callback name, when name is specified as the error parameter
[183] Fix | Delete
in the call to the encode/decode function.
[184] Fix | Delete
Return 0 on success, -1 on error */
[185] Fix | Delete
PyAPI_FUNC(int) PyCodec_RegisterError(const char *name, PyObject *error);
[186] Fix | Delete
[187] Fix | Delete
/* Lookup the error handling callback function registered under the given
[188] Fix | Delete
name. As a special case NULL can be passed, in which case
[189] Fix | Delete
the error handling callback for "strict" will be returned. */
[190] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_LookupError(const char *name);
[191] Fix | Delete
[192] Fix | Delete
/* raise exc as an exception */
[193] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_StrictErrors(PyObject *exc);
[194] Fix | Delete
[195] Fix | Delete
/* ignore the unicode error, skipping the faulty input */
[196] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_IgnoreErrors(PyObject *exc);
[197] Fix | Delete
[198] Fix | Delete
/* replace the unicode encode error with ? or U+FFFD */
[199] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_ReplaceErrors(PyObject *exc);
[200] Fix | Delete
[201] Fix | Delete
/* replace the unicode encode error with XML character references */
[202] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_XMLCharRefReplaceErrors(PyObject *exc);
[203] Fix | Delete
[204] Fix | Delete
/* replace the unicode encode error with backslash escapes (\x, \u and \U) */
[205] Fix | Delete
PyAPI_FUNC(PyObject *) PyCodec_BackslashReplaceErrors(PyObject *exc);
[206] Fix | Delete
[207] Fix | Delete
#ifdef __cplusplus
[208] Fix | Delete
}
[209] Fix | Delete
#endif
[210] Fix | Delete
#endif /* !Py_CODECREGISTRY_H */
[211] Fix | Delete
[212] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function