Skip to content

Commit 2d494ce

Browse files
committed
Fix onError label
Declare variables earlier
1 parent cc1daca commit 2d494ce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Objects/unicodeobject.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9077,6 +9077,9 @@ _PyUnicode_EncodeCharmap(PyObject *unicode,
90779077
const void *data = PyUnicode_DATA(unicode);
90789078
int kind = PyUnicode_KIND(unicode);
90799079

9080+
PyObject *error_handler_obj = NULL;
9081+
PyObject *exc = NULL;
9082+
90809083
/* output object */
90819084
PyBytesWriter *writer;
90829085
/* allocate enough for a simple encoding without
@@ -9090,8 +9093,6 @@ _PyUnicode_EncodeCharmap(PyObject *unicode,
90909093
Py_ssize_t inpos = 0;
90919094
/* current output position */
90929095
Py_ssize_t respos = 0;
9093-
PyObject *error_handler_obj = NULL;
9094-
PyObject *exc = NULL;
90959096
_Py_error_handler error_handler = _Py_ERROR_UNKNOWN;
90969097

90979098
while (inpos<size) {

0 commit comments

Comments
 (0)