Skip to content

Commit d5565a8

Browse files
committed
Fix onError label
Declare variables earlier
1 parent d807b18 commit d5565a8

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
@@ -9093,6 +9093,9 @@ _PyUnicode_EncodeCharmap(PyObject *unicode,
90939093
const void *data = PyUnicode_DATA(unicode);
90949094
int kind = PyUnicode_KIND(unicode);
90959095

9096+
PyObject *error_handler_obj = NULL;
9097+
PyObject *exc = NULL;
9098+
90969099
/* output object */
90979100
PyBytesWriter *writer;
90989101
/* allocate enough for a simple encoding without
@@ -9106,8 +9109,6 @@ _PyUnicode_EncodeCharmap(PyObject *unicode,
91069109
Py_ssize_t inpos = 0;
91079110
/* current output position */
91089111
Py_ssize_t respos = 0;
9109-
PyObject *error_handler_obj = NULL;
9110-
PyObject *exc = NULL;
91119112
_Py_error_handler error_handler = _Py_ERROR_UNKNOWN;
91129113

91139114
while (inpos<size) {

0 commit comments

Comments
 (0)