2014-08-22 12:45:03 -03:00
|
|
|
/*[clinic input]
|
|
|
|
preserve
|
|
|
|
[clinic start generated code]*/
|
|
|
|
|
2022-08-11 18:25:49 -03:00
|
|
|
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
|
|
|
# include "pycore_gc.h" // PyGC_Head
|
|
|
|
# include "pycore_runtime.h" // _Py_ID()
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2014-08-22 12:45:03 -03:00
|
|
|
PyDoc_STRVAR(_multibytecodec_MultibyteCodec_encode__doc__,
|
|
|
|
"encode($self, /, input, errors=None)\n"
|
|
|
|
"--\n"
|
|
|
|
"\n"
|
|
|
|
"Return an encoded string version of `input\'.\n"
|
|
|
|
"\n"
|
|
|
|
"\'errors\' may be given to set a different error handling scheme. Default is\n"
|
|
|
|
"\'strict\' meaning that encoding errors raise a UnicodeEncodeError. Other possible\n"
|
|
|
|
"values are \'ignore\', \'replace\' and \'xmlcharrefreplace\' as well as any other name\n"
|
|
|
|
"registered with codecs.register_error that can handle UnicodeEncodeErrors.");
|
|
|
|
|
|
|
|
#define _MULTIBYTECODEC_MULTIBYTECODEC_ENCODE_METHODDEF \
|
2022-05-03 15:25:41 -03:00
|
|
|
{"encode", _PyCFunction_CAST(_multibytecodec_MultibyteCodec_encode), METH_FASTCALL|METH_KEYWORDS, _multibytecodec_MultibyteCodec_encode__doc__},
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
static PyObject *
|
2015-04-14 19:07:59 -03:00
|
|
|
_multibytecodec_MultibyteCodec_encode_impl(MultibyteCodecObject *self,
|
|
|
|
PyObject *input,
|
|
|
|
const char *errors);
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
static PyObject *
|
2017-12-15 07:11:11 -04:00
|
|
|
_multibytecodec_MultibyteCodec_encode(MultibyteCodecObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
2014-08-22 12:45:03 -03:00
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
2022-08-13 07:09:40 -03:00
|
|
|
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
2022-08-11 18:25:49 -03:00
|
|
|
|
2022-08-13 07:09:40 -03:00
|
|
|
#define NUM_KEYWORDS 2
|
2022-08-11 18:25:49 -03:00
|
|
|
static struct {
|
|
|
|
PyGC_Head _this_is_not_used;
|
|
|
|
PyObject_VAR_HEAD
|
|
|
|
PyObject *ob_item[NUM_KEYWORDS];
|
|
|
|
} _kwtuple = {
|
|
|
|
.ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
|
|
|
|
.ob_item = { &_Py_ID(input), &_Py_ID(errors), },
|
|
|
|
};
|
|
|
|
#undef NUM_KEYWORDS
|
2022-08-13 07:09:40 -03:00
|
|
|
#define KWTUPLE (&_kwtuple.ob_base.ob_base)
|
|
|
|
|
|
|
|
#else // !Py_BUILD_CORE
|
|
|
|
# define KWTUPLE NULL
|
|
|
|
#endif // !Py_BUILD_CORE
|
2022-08-11 18:25:49 -03:00
|
|
|
|
2016-08-14 04:52:18 -03:00
|
|
|
static const char * const _keywords[] = {"input", "errors", NULL};
|
2022-08-11 18:25:49 -03:00
|
|
|
static _PyArg_Parser _parser = {
|
|
|
|
.keywords = _keywords,
|
|
|
|
.fname = "encode",
|
|
|
|
.kwtuple = KWTUPLE,
|
|
|
|
};
|
|
|
|
#undef KWTUPLE
|
2019-03-14 05:32:22 -03:00
|
|
|
PyObject *argsbuf[2];
|
|
|
|
Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
|
2014-08-22 12:45:03 -03:00
|
|
|
PyObject *input;
|
|
|
|
const char *errors = NULL;
|
|
|
|
|
2019-03-14 05:32:22 -03:00
|
|
|
args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf);
|
|
|
|
if (!args) {
|
2014-08-22 12:45:03 -03:00
|
|
|
goto exit;
|
2016-06-09 10:16:06 -03:00
|
|
|
}
|
2019-03-14 05:32:22 -03:00
|
|
|
input = args[0];
|
|
|
|
if (!noptargs) {
|
|
|
|
goto skip_optional_pos;
|
|
|
|
}
|
|
|
|
if (args[1] == Py_None) {
|
|
|
|
errors = NULL;
|
|
|
|
}
|
|
|
|
else if (PyUnicode_Check(args[1])) {
|
|
|
|
Py_ssize_t errors_length;
|
|
|
|
errors = PyUnicode_AsUTF8AndSize(args[1], &errors_length);
|
|
|
|
if (errors == NULL) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
if (strlen(errors) != (size_t)errors_length) {
|
|
|
|
PyErr_SetString(PyExc_ValueError, "embedded null character");
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
2019-08-29 11:49:08 -03:00
|
|
|
_PyArg_BadArgument("encode", "argument 'errors'", "str or None", args[1]);
|
2019-03-14 05:32:22 -03:00
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
skip_optional_pos:
|
2014-08-22 12:45:03 -03:00
|
|
|
return_value = _multibytecodec_MultibyteCodec_encode_impl(self, input, errors);
|
|
|
|
|
|
|
|
exit:
|
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
PyDoc_STRVAR(_multibytecodec_MultibyteCodec_decode__doc__,
|
|
|
|
"decode($self, /, input, errors=None)\n"
|
|
|
|
"--\n"
|
|
|
|
"\n"
|
|
|
|
"Decodes \'input\'.\n"
|
|
|
|
"\n"
|
|
|
|
"\'errors\' may be given to set a different error handling scheme. Default is\n"
|
|
|
|
"\'strict\' meaning that encoding errors raise a UnicodeDecodeError. Other possible\n"
|
|
|
|
"values are \'ignore\' and \'replace\' as well as any other name registered with\n"
|
|
|
|
"codecs.register_error that is able to handle UnicodeDecodeErrors.\"");
|
|
|
|
|
|
|
|
#define _MULTIBYTECODEC_MULTIBYTECODEC_DECODE_METHODDEF \
|
2022-05-03 15:25:41 -03:00
|
|
|
{"decode", _PyCFunction_CAST(_multibytecodec_MultibyteCodec_decode), METH_FASTCALL|METH_KEYWORDS, _multibytecodec_MultibyteCodec_decode__doc__},
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
static PyObject *
|
2015-04-14 19:07:59 -03:00
|
|
|
_multibytecodec_MultibyteCodec_decode_impl(MultibyteCodecObject *self,
|
|
|
|
Py_buffer *input,
|
|
|
|
const char *errors);
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
static PyObject *
|
2017-12-15 07:11:11 -04:00
|
|
|
_multibytecodec_MultibyteCodec_decode(MultibyteCodecObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
2014-08-22 12:45:03 -03:00
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
2022-08-13 07:09:40 -03:00
|
|
|
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
2022-08-11 18:25:49 -03:00
|
|
|
|
2022-08-13 07:09:40 -03:00
|
|
|
#define NUM_KEYWORDS 2
|
2022-08-11 18:25:49 -03:00
|
|
|
static struct {
|
|
|
|
PyGC_Head _this_is_not_used;
|
|
|
|
PyObject_VAR_HEAD
|
|
|
|
PyObject *ob_item[NUM_KEYWORDS];
|
|
|
|
} _kwtuple = {
|
|
|
|
.ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
|
|
|
|
.ob_item = { &_Py_ID(input), &_Py_ID(errors), },
|
|
|
|
};
|
|
|
|
#undef NUM_KEYWORDS
|
2022-08-13 07:09:40 -03:00
|
|
|
#define KWTUPLE (&_kwtuple.ob_base.ob_base)
|
|
|
|
|
|
|
|
#else // !Py_BUILD_CORE
|
|
|
|
# define KWTUPLE NULL
|
|
|
|
#endif // !Py_BUILD_CORE
|
2022-08-11 18:25:49 -03:00
|
|
|
|
2016-08-14 04:52:18 -03:00
|
|
|
static const char * const _keywords[] = {"input", "errors", NULL};
|
2022-08-11 18:25:49 -03:00
|
|
|
static _PyArg_Parser _parser = {
|
|
|
|
.keywords = _keywords,
|
|
|
|
.fname = "decode",
|
|
|
|
.kwtuple = KWTUPLE,
|
|
|
|
};
|
|
|
|
#undef KWTUPLE
|
2019-03-14 05:32:22 -03:00
|
|
|
PyObject *argsbuf[2];
|
|
|
|
Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
|
2014-08-22 12:45:03 -03:00
|
|
|
Py_buffer input = {NULL, NULL};
|
|
|
|
const char *errors = NULL;
|
|
|
|
|
2019-03-14 05:32:22 -03:00
|
|
|
args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf);
|
|
|
|
if (!args) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
if (PyObject_GetBuffer(args[0], &input, PyBUF_SIMPLE) != 0) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
if (!PyBuffer_IsContiguous(&input, 'C')) {
|
2019-08-29 11:49:08 -03:00
|
|
|
_PyArg_BadArgument("decode", "argument 'input'", "contiguous buffer", args[0]);
|
2019-03-14 05:32:22 -03:00
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
if (!noptargs) {
|
|
|
|
goto skip_optional_pos;
|
|
|
|
}
|
|
|
|
if (args[1] == Py_None) {
|
|
|
|
errors = NULL;
|
|
|
|
}
|
|
|
|
else if (PyUnicode_Check(args[1])) {
|
|
|
|
Py_ssize_t errors_length;
|
|
|
|
errors = PyUnicode_AsUTF8AndSize(args[1], &errors_length);
|
|
|
|
if (errors == NULL) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
if (strlen(errors) != (size_t)errors_length) {
|
|
|
|
PyErr_SetString(PyExc_ValueError, "embedded null character");
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
2019-08-29 11:49:08 -03:00
|
|
|
_PyArg_BadArgument("decode", "argument 'errors'", "str or None", args[1]);
|
2014-08-22 12:45:03 -03:00
|
|
|
goto exit;
|
2016-06-09 10:16:06 -03:00
|
|
|
}
|
2019-03-14 05:32:22 -03:00
|
|
|
skip_optional_pos:
|
2014-08-22 12:45:03 -03:00
|
|
|
return_value = _multibytecodec_MultibyteCodec_decode_impl(self, &input, errors);
|
|
|
|
|
|
|
|
exit:
|
|
|
|
/* Cleanup for input */
|
2016-06-09 10:16:06 -03:00
|
|
|
if (input.obj) {
|
2014-08-22 12:45:03 -03:00
|
|
|
PyBuffer_Release(&input);
|
2016-06-09 10:16:06 -03:00
|
|
|
}
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalEncoder_encode__doc__,
|
2015-05-30 05:30:39 -03:00
|
|
|
"encode($self, /, input, final=False)\n"
|
2015-04-13 20:22:35 -03:00
|
|
|
"--\n"
|
|
|
|
"\n");
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
#define _MULTIBYTECODEC_MULTIBYTEINCREMENTALENCODER_ENCODE_METHODDEF \
|
2022-05-03 15:25:41 -03:00
|
|
|
{"encode", _PyCFunction_CAST(_multibytecodec_MultibyteIncrementalEncoder_encode), METH_FASTCALL|METH_KEYWORDS, _multibytecodec_MultibyteIncrementalEncoder_encode__doc__},
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
static PyObject *
|
2015-04-14 19:07:59 -03:00
|
|
|
_multibytecodec_MultibyteIncrementalEncoder_encode_impl(MultibyteIncrementalEncoderObject *self,
|
|
|
|
PyObject *input,
|
|
|
|
int final);
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
static PyObject *
|
2017-12-15 07:11:11 -04:00
|
|
|
_multibytecodec_MultibyteIncrementalEncoder_encode(MultibyteIncrementalEncoderObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
2014-08-22 12:45:03 -03:00
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
2022-08-13 07:09:40 -03:00
|
|
|
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
2022-08-11 18:25:49 -03:00
|
|
|
|
2022-08-13 07:09:40 -03:00
|
|
|
#define NUM_KEYWORDS 2
|
2022-08-11 18:25:49 -03:00
|
|
|
static struct {
|
|
|
|
PyGC_Head _this_is_not_used;
|
|
|
|
PyObject_VAR_HEAD
|
|
|
|
PyObject *ob_item[NUM_KEYWORDS];
|
|
|
|
} _kwtuple = {
|
|
|
|
.ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
|
|
|
|
.ob_item = { &_Py_ID(input), &_Py_ID(final), },
|
|
|
|
};
|
|
|
|
#undef NUM_KEYWORDS
|
2022-08-13 07:09:40 -03:00
|
|
|
#define KWTUPLE (&_kwtuple.ob_base.ob_base)
|
|
|
|
|
|
|
|
#else // !Py_BUILD_CORE
|
|
|
|
# define KWTUPLE NULL
|
|
|
|
#endif // !Py_BUILD_CORE
|
2022-08-11 18:25:49 -03:00
|
|
|
|
2016-08-14 04:52:18 -03:00
|
|
|
static const char * const _keywords[] = {"input", "final", NULL};
|
2022-08-11 18:25:49 -03:00
|
|
|
static _PyArg_Parser _parser = {
|
|
|
|
.keywords = _keywords,
|
|
|
|
.fname = "encode",
|
|
|
|
.kwtuple = KWTUPLE,
|
|
|
|
};
|
|
|
|
#undef KWTUPLE
|
2019-03-14 05:32:22 -03:00
|
|
|
PyObject *argsbuf[2];
|
|
|
|
Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
|
2014-08-22 12:45:03 -03:00
|
|
|
PyObject *input;
|
|
|
|
int final = 0;
|
|
|
|
|
2019-03-14 05:32:22 -03:00
|
|
|
args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf);
|
|
|
|
if (!args) {
|
2014-08-22 12:45:03 -03:00
|
|
|
goto exit;
|
2016-06-09 10:16:06 -03:00
|
|
|
}
|
2019-03-14 05:32:22 -03:00
|
|
|
input = args[0];
|
|
|
|
if (!noptargs) {
|
|
|
|
goto skip_optional_pos;
|
|
|
|
}
|
|
|
|
final = _PyLong_AsInt(args[1]);
|
|
|
|
if (final == -1 && PyErr_Occurred()) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
skip_optional_pos:
|
2014-08-22 12:45:03 -03:00
|
|
|
return_value = _multibytecodec_MultibyteIncrementalEncoder_encode_impl(self, input, final);
|
|
|
|
|
|
|
|
exit:
|
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
2018-11-01 07:48:49 -03:00
|
|
|
PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalEncoder_getstate__doc__,
|
|
|
|
"getstate($self, /)\n"
|
|
|
|
"--\n"
|
|
|
|
"\n");
|
|
|
|
|
|
|
|
#define _MULTIBYTECODEC_MULTIBYTEINCREMENTALENCODER_GETSTATE_METHODDEF \
|
|
|
|
{"getstate", (PyCFunction)_multibytecodec_MultibyteIncrementalEncoder_getstate, METH_NOARGS, _multibytecodec_MultibyteIncrementalEncoder_getstate__doc__},
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
_multibytecodec_MultibyteIncrementalEncoder_getstate_impl(MultibyteIncrementalEncoderObject *self);
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
_multibytecodec_MultibyteIncrementalEncoder_getstate(MultibyteIncrementalEncoderObject *self, PyObject *Py_UNUSED(ignored))
|
|
|
|
{
|
|
|
|
return _multibytecodec_MultibyteIncrementalEncoder_getstate_impl(self);
|
|
|
|
}
|
|
|
|
|
|
|
|
PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalEncoder_setstate__doc__,
|
|
|
|
"setstate($self, state, /)\n"
|
|
|
|
"--\n"
|
|
|
|
"\n");
|
|
|
|
|
|
|
|
#define _MULTIBYTECODEC_MULTIBYTEINCREMENTALENCODER_SETSTATE_METHODDEF \
|
|
|
|
{"setstate", (PyCFunction)_multibytecodec_MultibyteIncrementalEncoder_setstate, METH_O, _multibytecodec_MultibyteIncrementalEncoder_setstate__doc__},
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
_multibytecodec_MultibyteIncrementalEncoder_setstate_impl(MultibyteIncrementalEncoderObject *self,
|
|
|
|
PyLongObject *statelong);
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
_multibytecodec_MultibyteIncrementalEncoder_setstate(MultibyteIncrementalEncoderObject *self, PyObject *arg)
|
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
|
|
|
PyLongObject *statelong;
|
|
|
|
|
2018-12-25 07:23:47 -04:00
|
|
|
if (!PyLong_Check(arg)) {
|
2019-08-29 11:49:08 -03:00
|
|
|
_PyArg_BadArgument("setstate", "argument", "int", arg);
|
2018-11-01 07:48:49 -03:00
|
|
|
goto exit;
|
|
|
|
}
|
2018-12-25 07:23:47 -04:00
|
|
|
statelong = (PyLongObject *)arg;
|
2018-11-01 07:48:49 -03:00
|
|
|
return_value = _multibytecodec_MultibyteIncrementalEncoder_setstate_impl(self, statelong);
|
|
|
|
|
|
|
|
exit:
|
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
2014-08-22 12:45:03 -03:00
|
|
|
PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalEncoder_reset__doc__,
|
|
|
|
"reset($self, /)\n"
|
2015-04-13 20:22:35 -03:00
|
|
|
"--\n"
|
|
|
|
"\n");
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
#define _MULTIBYTECODEC_MULTIBYTEINCREMENTALENCODER_RESET_METHODDEF \
|
|
|
|
{"reset", (PyCFunction)_multibytecodec_MultibyteIncrementalEncoder_reset, METH_NOARGS, _multibytecodec_MultibyteIncrementalEncoder_reset__doc__},
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
_multibytecodec_MultibyteIncrementalEncoder_reset_impl(MultibyteIncrementalEncoderObject *self);
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
_multibytecodec_MultibyteIncrementalEncoder_reset(MultibyteIncrementalEncoderObject *self, PyObject *Py_UNUSED(ignored))
|
|
|
|
{
|
|
|
|
return _multibytecodec_MultibyteIncrementalEncoder_reset_impl(self);
|
|
|
|
}
|
|
|
|
|
|
|
|
PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalDecoder_decode__doc__,
|
2015-05-30 05:30:39 -03:00
|
|
|
"decode($self, /, input, final=False)\n"
|
2015-04-13 20:22:35 -03:00
|
|
|
"--\n"
|
|
|
|
"\n");
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
#define _MULTIBYTECODEC_MULTIBYTEINCREMENTALDECODER_DECODE_METHODDEF \
|
2022-05-03 15:25:41 -03:00
|
|
|
{"decode", _PyCFunction_CAST(_multibytecodec_MultibyteIncrementalDecoder_decode), METH_FASTCALL|METH_KEYWORDS, _multibytecodec_MultibyteIncrementalDecoder_decode__doc__},
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
static PyObject *
|
2015-04-14 19:07:59 -03:00
|
|
|
_multibytecodec_MultibyteIncrementalDecoder_decode_impl(MultibyteIncrementalDecoderObject *self,
|
|
|
|
Py_buffer *input,
|
|
|
|
int final);
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
static PyObject *
|
2017-12-15 07:11:11 -04:00
|
|
|
_multibytecodec_MultibyteIncrementalDecoder_decode(MultibyteIncrementalDecoderObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
2014-08-22 12:45:03 -03:00
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
2022-08-13 07:09:40 -03:00
|
|
|
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
2022-08-11 18:25:49 -03:00
|
|
|
|
2022-08-13 07:09:40 -03:00
|
|
|
#define NUM_KEYWORDS 2
|
2022-08-11 18:25:49 -03:00
|
|
|
static struct {
|
|
|
|
PyGC_Head _this_is_not_used;
|
|
|
|
PyObject_VAR_HEAD
|
|
|
|
PyObject *ob_item[NUM_KEYWORDS];
|
|
|
|
} _kwtuple = {
|
|
|
|
.ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
|
|
|
|
.ob_item = { &_Py_ID(input), &_Py_ID(final), },
|
|
|
|
};
|
|
|
|
#undef NUM_KEYWORDS
|
2022-08-13 07:09:40 -03:00
|
|
|
#define KWTUPLE (&_kwtuple.ob_base.ob_base)
|
|
|
|
|
|
|
|
#else // !Py_BUILD_CORE
|
|
|
|
# define KWTUPLE NULL
|
|
|
|
#endif // !Py_BUILD_CORE
|
2022-08-11 18:25:49 -03:00
|
|
|
|
2016-08-14 04:52:18 -03:00
|
|
|
static const char * const _keywords[] = {"input", "final", NULL};
|
2022-08-11 18:25:49 -03:00
|
|
|
static _PyArg_Parser _parser = {
|
|
|
|
.keywords = _keywords,
|
|
|
|
.fname = "decode",
|
|
|
|
.kwtuple = KWTUPLE,
|
|
|
|
};
|
|
|
|
#undef KWTUPLE
|
2019-03-14 05:32:22 -03:00
|
|
|
PyObject *argsbuf[2];
|
|
|
|
Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
|
2014-08-22 12:45:03 -03:00
|
|
|
Py_buffer input = {NULL, NULL};
|
|
|
|
int final = 0;
|
|
|
|
|
2019-03-14 05:32:22 -03:00
|
|
|
args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf);
|
|
|
|
if (!args) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
if (PyObject_GetBuffer(args[0], &input, PyBUF_SIMPLE) != 0) {
|
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
if (!PyBuffer_IsContiguous(&input, 'C')) {
|
2019-08-29 11:49:08 -03:00
|
|
|
_PyArg_BadArgument("decode", "argument 'input'", "contiguous buffer", args[0]);
|
2019-03-14 05:32:22 -03:00
|
|
|
goto exit;
|
|
|
|
}
|
|
|
|
if (!noptargs) {
|
|
|
|
goto skip_optional_pos;
|
|
|
|
}
|
|
|
|
final = _PyLong_AsInt(args[1]);
|
|
|
|
if (final == -1 && PyErr_Occurred()) {
|
2014-08-22 12:45:03 -03:00
|
|
|
goto exit;
|
2016-06-09 10:16:06 -03:00
|
|
|
}
|
2019-03-14 05:32:22 -03:00
|
|
|
skip_optional_pos:
|
2014-08-22 12:45:03 -03:00
|
|
|
return_value = _multibytecodec_MultibyteIncrementalDecoder_decode_impl(self, &input, final);
|
|
|
|
|
|
|
|
exit:
|
|
|
|
/* Cleanup for input */
|
2016-06-09 10:16:06 -03:00
|
|
|
if (input.obj) {
|
2014-08-22 12:45:03 -03:00
|
|
|
PyBuffer_Release(&input);
|
2016-06-09 10:16:06 -03:00
|
|
|
}
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
2018-11-01 07:48:49 -03:00
|
|
|
PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalDecoder_getstate__doc__,
|
|
|
|
"getstate($self, /)\n"
|
|
|
|
"--\n"
|
|
|
|
"\n");
|
|
|
|
|
|
|
|
#define _MULTIBYTECODEC_MULTIBYTEINCREMENTALDECODER_GETSTATE_METHODDEF \
|
|
|
|
{"getstate", (PyCFunction)_multibytecodec_MultibyteIncrementalDecoder_getstate, METH_NOARGS, _multibytecodec_MultibyteIncrementalDecoder_getstate__doc__},
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
_multibytecodec_MultibyteIncrementalDecoder_getstate_impl(MultibyteIncrementalDecoderObject *self);
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
_multibytecodec_MultibyteIncrementalDecoder_getstate(MultibyteIncrementalDecoderObject *self, PyObject *Py_UNUSED(ignored))
|
|
|
|
{
|
|
|
|
return _multibytecodec_MultibyteIncrementalDecoder_getstate_impl(self);
|
|
|
|
}
|
|
|
|
|
|
|
|
PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalDecoder_setstate__doc__,
|
|
|
|
"setstate($self, state, /)\n"
|
|
|
|
"--\n"
|
|
|
|
"\n");
|
|
|
|
|
|
|
|
#define _MULTIBYTECODEC_MULTIBYTEINCREMENTALDECODER_SETSTATE_METHODDEF \
|
|
|
|
{"setstate", (PyCFunction)_multibytecodec_MultibyteIncrementalDecoder_setstate, METH_O, _multibytecodec_MultibyteIncrementalDecoder_setstate__doc__},
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
_multibytecodec_MultibyteIncrementalDecoder_setstate_impl(MultibyteIncrementalDecoderObject *self,
|
|
|
|
PyObject *state);
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
_multibytecodec_MultibyteIncrementalDecoder_setstate(MultibyteIncrementalDecoderObject *self, PyObject *arg)
|
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
|
|
|
PyObject *state;
|
|
|
|
|
2018-12-25 07:23:47 -04:00
|
|
|
if (!PyTuple_Check(arg)) {
|
2019-08-29 11:49:08 -03:00
|
|
|
_PyArg_BadArgument("setstate", "argument", "tuple", arg);
|
2018-11-01 07:48:49 -03:00
|
|
|
goto exit;
|
|
|
|
}
|
2018-12-25 07:23:47 -04:00
|
|
|
state = arg;
|
2018-11-01 07:48:49 -03:00
|
|
|
return_value = _multibytecodec_MultibyteIncrementalDecoder_setstate_impl(self, state);
|
|
|
|
|
|
|
|
exit:
|
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
2014-08-22 12:45:03 -03:00
|
|
|
PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalDecoder_reset__doc__,
|
|
|
|
"reset($self, /)\n"
|
2015-04-13 20:22:35 -03:00
|
|
|
"--\n"
|
|
|
|
"\n");
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
#define _MULTIBYTECODEC_MULTIBYTEINCREMENTALDECODER_RESET_METHODDEF \
|
|
|
|
{"reset", (PyCFunction)_multibytecodec_MultibyteIncrementalDecoder_reset, METH_NOARGS, _multibytecodec_MultibyteIncrementalDecoder_reset__doc__},
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
_multibytecodec_MultibyteIncrementalDecoder_reset_impl(MultibyteIncrementalDecoderObject *self);
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
_multibytecodec_MultibyteIncrementalDecoder_reset(MultibyteIncrementalDecoderObject *self, PyObject *Py_UNUSED(ignored))
|
|
|
|
{
|
|
|
|
return _multibytecodec_MultibyteIncrementalDecoder_reset_impl(self);
|
|
|
|
}
|
|
|
|
|
|
|
|
PyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_read__doc__,
|
|
|
|
"read($self, sizeobj=None, /)\n"
|
2015-04-13 20:22:35 -03:00
|
|
|
"--\n"
|
|
|
|
"\n");
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
#define _MULTIBYTECODEC_MULTIBYTESTREAMREADER_READ_METHODDEF \
|
2022-05-03 15:25:41 -03:00
|
|
|
{"read", _PyCFunction_CAST(_multibytecodec_MultibyteStreamReader_read), METH_FASTCALL, _multibytecodec_MultibyteStreamReader_read__doc__},
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
static PyObject *
|
2015-04-14 19:07:59 -03:00
|
|
|
_multibytecodec_MultibyteStreamReader_read_impl(MultibyteStreamReaderObject *self,
|
|
|
|
PyObject *sizeobj);
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
static PyObject *
|
2017-12-15 07:11:11 -04:00
|
|
|
_multibytecodec_MultibyteStreamReader_read(MultibyteStreamReaderObject *self, PyObject *const *args, Py_ssize_t nargs)
|
2014-08-22 12:45:03 -03:00
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
|
|
|
PyObject *sizeobj = Py_None;
|
|
|
|
|
2019-01-11 12:01:42 -04:00
|
|
|
if (!_PyArg_CheckPositional("read", nargs, 0, 1)) {
|
2017-01-16 21:21:47 -04:00
|
|
|
goto exit;
|
|
|
|
}
|
2019-01-11 12:01:42 -04:00
|
|
|
if (nargs < 1) {
|
|
|
|
goto skip_optional;
|
|
|
|
}
|
|
|
|
sizeobj = args[0];
|
|
|
|
skip_optional:
|
2014-08-22 12:45:03 -03:00
|
|
|
return_value = _multibytecodec_MultibyteStreamReader_read_impl(self, sizeobj);
|
|
|
|
|
|
|
|
exit:
|
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
PyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_readline__doc__,
|
|
|
|
"readline($self, sizeobj=None, /)\n"
|
2015-04-13 20:22:35 -03:00
|
|
|
"--\n"
|
|
|
|
"\n");
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
#define _MULTIBYTECODEC_MULTIBYTESTREAMREADER_READLINE_METHODDEF \
|
2022-05-03 15:25:41 -03:00
|
|
|
{"readline", _PyCFunction_CAST(_multibytecodec_MultibyteStreamReader_readline), METH_FASTCALL, _multibytecodec_MultibyteStreamReader_readline__doc__},
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
static PyObject *
|
2015-04-14 19:07:59 -03:00
|
|
|
_multibytecodec_MultibyteStreamReader_readline_impl(MultibyteStreamReaderObject *self,
|
|
|
|
PyObject *sizeobj);
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
static PyObject *
|
2017-12-15 07:11:11 -04:00
|
|
|
_multibytecodec_MultibyteStreamReader_readline(MultibyteStreamReaderObject *self, PyObject *const *args, Py_ssize_t nargs)
|
2014-08-22 12:45:03 -03:00
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
|
|
|
PyObject *sizeobj = Py_None;
|
|
|
|
|
2019-01-11 12:01:42 -04:00
|
|
|
if (!_PyArg_CheckPositional("readline", nargs, 0, 1)) {
|
2017-01-16 21:21:47 -04:00
|
|
|
goto exit;
|
|
|
|
}
|
2019-01-11 12:01:42 -04:00
|
|
|
if (nargs < 1) {
|
|
|
|
goto skip_optional;
|
|
|
|
}
|
|
|
|
sizeobj = args[0];
|
|
|
|
skip_optional:
|
2014-08-22 12:45:03 -03:00
|
|
|
return_value = _multibytecodec_MultibyteStreamReader_readline_impl(self, sizeobj);
|
|
|
|
|
|
|
|
exit:
|
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
PyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_readlines__doc__,
|
|
|
|
"readlines($self, sizehintobj=None, /)\n"
|
2015-04-13 20:22:35 -03:00
|
|
|
"--\n"
|
|
|
|
"\n");
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
#define _MULTIBYTECODEC_MULTIBYTESTREAMREADER_READLINES_METHODDEF \
|
2022-05-03 15:25:41 -03:00
|
|
|
{"readlines", _PyCFunction_CAST(_multibytecodec_MultibyteStreamReader_readlines), METH_FASTCALL, _multibytecodec_MultibyteStreamReader_readlines__doc__},
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
static PyObject *
|
2015-04-14 19:07:59 -03:00
|
|
|
_multibytecodec_MultibyteStreamReader_readlines_impl(MultibyteStreamReaderObject *self,
|
|
|
|
PyObject *sizehintobj);
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
static PyObject *
|
2017-12-15 07:11:11 -04:00
|
|
|
_multibytecodec_MultibyteStreamReader_readlines(MultibyteStreamReaderObject *self, PyObject *const *args, Py_ssize_t nargs)
|
2014-08-22 12:45:03 -03:00
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
|
|
|
PyObject *sizehintobj = Py_None;
|
|
|
|
|
2019-01-11 12:01:42 -04:00
|
|
|
if (!_PyArg_CheckPositional("readlines", nargs, 0, 1)) {
|
2017-01-16 21:21:47 -04:00
|
|
|
goto exit;
|
|
|
|
}
|
2019-01-11 12:01:42 -04:00
|
|
|
if (nargs < 1) {
|
|
|
|
goto skip_optional;
|
|
|
|
}
|
|
|
|
sizehintobj = args[0];
|
|
|
|
skip_optional:
|
2014-08-22 12:45:03 -03:00
|
|
|
return_value = _multibytecodec_MultibyteStreamReader_readlines_impl(self, sizehintobj);
|
|
|
|
|
|
|
|
exit:
|
|
|
|
return return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
PyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_reset__doc__,
|
|
|
|
"reset($self, /)\n"
|
2015-04-13 20:22:35 -03:00
|
|
|
"--\n"
|
|
|
|
"\n");
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
#define _MULTIBYTECODEC_MULTIBYTESTREAMREADER_RESET_METHODDEF \
|
|
|
|
{"reset", (PyCFunction)_multibytecodec_MultibyteStreamReader_reset, METH_NOARGS, _multibytecodec_MultibyteStreamReader_reset__doc__},
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
_multibytecodec_MultibyteStreamReader_reset_impl(MultibyteStreamReaderObject *self);
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
_multibytecodec_MultibyteStreamReader_reset(MultibyteStreamReaderObject *self, PyObject *Py_UNUSED(ignored))
|
|
|
|
{
|
|
|
|
return _multibytecodec_MultibyteStreamReader_reset_impl(self);
|
|
|
|
}
|
|
|
|
|
|
|
|
PyDoc_STRVAR(_multibytecodec_MultibyteStreamWriter_write__doc__,
|
|
|
|
"write($self, strobj, /)\n"
|
2015-04-13 20:22:35 -03:00
|
|
|
"--\n"
|
|
|
|
"\n");
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
#define _MULTIBYTECODEC_MULTIBYTESTREAMWRITER_WRITE_METHODDEF \
|
2022-05-03 15:25:41 -03:00
|
|
|
{"write", _PyCFunction_CAST(_multibytecodec_MultibyteStreamWriter_write), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, _multibytecodec_MultibyteStreamWriter_write__doc__},
|
2022-03-01 10:35:43 -04:00
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
_multibytecodec_MultibyteStreamWriter_write_impl(MultibyteStreamWriterObject *self,
|
|
|
|
PyTypeObject *cls,
|
|
|
|
PyObject *strobj);
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
_multibytecodec_MultibyteStreamWriter_write(MultibyteStreamWriterObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
2022-08-13 07:09:40 -03:00
|
|
|
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
|
|
|
# define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty)
|
|
|
|
#else
|
|
|
|
# define KWTUPLE NULL
|
|
|
|
#endif
|
2022-08-11 18:25:49 -03:00
|
|
|
|
2022-03-01 10:35:43 -04:00
|
|
|
static const char * const _keywords[] = {"", NULL};
|
2022-08-11 18:25:49 -03:00
|
|
|
static _PyArg_Parser _parser = {
|
|
|
|
.keywords = _keywords,
|
|
|
|
.fname = "write",
|
|
|
|
.kwtuple = KWTUPLE,
|
|
|
|
};
|
|
|
|
#undef KWTUPLE
|
2022-04-30 07:15:02 -03:00
|
|
|
PyObject *argsbuf[1];
|
2022-03-01 10:35:43 -04:00
|
|
|
PyObject *strobj;
|
|
|
|
|
2022-04-30 07:15:02 -03:00
|
|
|
args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
|
|
|
|
if (!args) {
|
2022-03-01 10:35:43 -04:00
|
|
|
goto exit;
|
|
|
|
}
|
2022-04-30 07:15:02 -03:00
|
|
|
strobj = args[0];
|
2022-03-01 10:35:43 -04:00
|
|
|
return_value = _multibytecodec_MultibyteStreamWriter_write_impl(self, cls, strobj);
|
|
|
|
|
|
|
|
exit:
|
|
|
|
return return_value;
|
|
|
|
}
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
PyDoc_STRVAR(_multibytecodec_MultibyteStreamWriter_writelines__doc__,
|
|
|
|
"writelines($self, lines, /)\n"
|
2015-04-13 20:22:35 -03:00
|
|
|
"--\n"
|
|
|
|
"\n");
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
#define _MULTIBYTECODEC_MULTIBYTESTREAMWRITER_WRITELINES_METHODDEF \
|
2022-05-03 15:25:41 -03:00
|
|
|
{"writelines", _PyCFunction_CAST(_multibytecodec_MultibyteStreamWriter_writelines), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, _multibytecodec_MultibyteStreamWriter_writelines__doc__},
|
2022-03-01 10:35:43 -04:00
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
_multibytecodec_MultibyteStreamWriter_writelines_impl(MultibyteStreamWriterObject *self,
|
|
|
|
PyTypeObject *cls,
|
|
|
|
PyObject *lines);
|
|
|
|
|
|
|
|
static PyObject *
|
|
|
|
_multibytecodec_MultibyteStreamWriter_writelines(MultibyteStreamWriterObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
|
|
|
{
|
|
|
|
PyObject *return_value = NULL;
|
2022-08-13 07:09:40 -03:00
|
|
|
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
|
|
|
# define KWTUPLE (PyObject *)&_Py_SINGLETON(tuple_empty)
|
|
|
|
#else
|
|
|
|
# define KWTUPLE NULL
|
|
|
|
#endif
|
2022-08-11 18:25:49 -03:00
|
|
|
|
2022-03-01 10:35:43 -04:00
|
|
|
static const char * const _keywords[] = {"", NULL};
|
2022-08-11 18:25:49 -03:00
|
|
|
static _PyArg_Parser _parser = {
|
|
|
|
.keywords = _keywords,
|
|
|
|
.fname = "writelines",
|
|
|
|
.kwtuple = KWTUPLE,
|
|
|
|
};
|
|
|
|
#undef KWTUPLE
|
2022-04-30 07:15:02 -03:00
|
|
|
PyObject *argsbuf[1];
|
2022-03-01 10:35:43 -04:00
|
|
|
PyObject *lines;
|
|
|
|
|
2022-04-30 07:15:02 -03:00
|
|
|
args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
|
|
|
|
if (!args) {
|
2022-03-01 10:35:43 -04:00
|
|
|
goto exit;
|
|
|
|
}
|
2022-04-30 07:15:02 -03:00
|
|
|
lines = args[0];
|
2022-03-01 10:35:43 -04:00
|
|
|
return_value = _multibytecodec_MultibyteStreamWriter_writelines_impl(self, cls, lines);
|
|
|
|
|
|
|
|
exit:
|
|
|
|
return return_value;
|
|
|
|
}
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
PyDoc_STRVAR(_multibytecodec_MultibyteStreamWriter_reset__doc__,
|
|
|
|
"reset($self, /)\n"
|
2015-04-13 20:22:35 -03:00
|
|
|
"--\n"
|
|
|
|
"\n");
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
#define _MULTIBYTECODEC_MULTIBYTESTREAMWRITER_RESET_METHODDEF \
|
2022-05-03 15:25:41 -03:00
|
|
|
{"reset", _PyCFunction_CAST(_multibytecodec_MultibyteStreamWriter_reset), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, _multibytecodec_MultibyteStreamWriter_reset__doc__},
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
static PyObject *
|
2022-03-01 10:35:43 -04:00
|
|
|
_multibytecodec_MultibyteStreamWriter_reset_impl(MultibyteStreamWriterObject *self,
|
|
|
|
PyTypeObject *cls);
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
static PyObject *
|
2022-03-01 10:35:43 -04:00
|
|
|
_multibytecodec_MultibyteStreamWriter_reset(MultibyteStreamWriterObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
|
2014-08-22 12:45:03 -03:00
|
|
|
{
|
2022-04-30 07:15:02 -03:00
|
|
|
if (nargs) {
|
|
|
|
PyErr_SetString(PyExc_TypeError, "reset() takes no arguments");
|
|
|
|
return NULL;
|
2022-03-01 10:35:43 -04:00
|
|
|
}
|
2022-04-30 07:15:02 -03:00
|
|
|
return _multibytecodec_MultibyteStreamWriter_reset_impl(self, cls);
|
2014-08-22 12:45:03 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
PyDoc_STRVAR(_multibytecodec___create_codec__doc__,
|
|
|
|
"__create_codec($module, arg, /)\n"
|
2015-04-13 20:22:35 -03:00
|
|
|
"--\n"
|
|
|
|
"\n");
|
2014-08-22 12:45:03 -03:00
|
|
|
|
|
|
|
#define _MULTIBYTECODEC___CREATE_CODEC_METHODDEF \
|
|
|
|
{"__create_codec", (PyCFunction)_multibytecodec___create_codec, METH_O, _multibytecodec___create_codec__doc__},
|
2022-08-13 07:09:40 -03:00
|
|
|
/*[clinic end generated code: output=b034ec7126c11bde input=a9049054013a1b77]*/
|