Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-103583: Always pass multibyte codec structs as const#103588

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletionsModules/cjkcodecs/multibytecodec.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -67,7 +67,7 @@ typedef struct {
static char *incnewkwarglist[] = {"errors", NULL};
static char *streamkwarglist[] = {"stream", "errors", NULL};

static PyObject *multibytecodec_encode(MultibyteCodec *,
static PyObject *multibytecodec_encode(constMultibyteCodec *,
MultibyteCodec_State *, PyObject *, Py_ssize_t *,
PyObject *, int);

Expand DownExpand Up@@ -221,7 +221,7 @@ expand_encodebuffer(MultibyteEncodeBuffer *buf, Py_ssize_t esize)
*/

static int
multibytecodec_encerror(MultibyteCodec *codec,
multibytecodec_encerror(constMultibyteCodec *codec,
MultibyteCodec_State *state,
MultibyteEncodeBuffer *buf,
PyObject *errors, Py_ssize_t e)
Expand DownExpand Up@@ -375,7 +375,7 @@ multibytecodec_encerror(MultibyteCodec *codec,
}

static int
multibytecodec_decerror(MultibyteCodec *codec,
multibytecodec_decerror(constMultibyteCodec *codec,
MultibyteCodec_State *state,
MultibyteDecodeBuffer *buf,
PyObject *errors, Py_ssize_t e)
Expand DownExpand Up@@ -479,7 +479,7 @@ multibytecodec_decerror(MultibyteCodec *codec,
}

static PyObject *
multibytecodec_encode(MultibyteCodec *codec,
multibytecodec_encode(constMultibyteCodec *codec,
MultibyteCodec_State *state,
PyObject *text, Py_ssize_t *inpos_t,
PyObject *errors, int flags)
Expand DownExpand Up@@ -1953,7 +1953,7 @@ _multibytecodec___create_codec(PyObject *module, PyObject *arg)
/*[clinic end generated code: output=cfa3dce8260e809d input=6840b2a6b183fcfa]*/
{
MultibyteCodecObject *self;
MultibyteCodec *codec;
constMultibyteCodec *codec;

if (!PyCapsule_IsValid(arg, PyMultibyteCodec_CAPSULE_NAME)) {
PyErr_SetString(PyExc_ValueError, "argument type invalid");
Expand Down
4 changes: 2 additions & 2 deletionsModules/cjkcodecs/multibytecodec.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -62,14 +62,14 @@ typedef struct {

typedef struct {
PyObject_HEAD
MultibyteCodec *codec;
constMultibyteCodec *codec;
} MultibyteCodecObject;

#define MultibyteCodec_Check(state, op) Py_IS_TYPE((op), state->multibytecodec_type)

#define _MultibyteStatefulCodec_HEAD \
PyObject_HEAD \
MultibyteCodec *codec; \
constMultibyteCodec *codec; \
MultibyteCodec_State state; \
PyObject *errors;
typedef struct {
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp