File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -2516,10 +2516,9 @@ _PyBytes_FromHex(PyObject *string, int use_bytearray)
2516
2516
}
2517
2517
2518
2518
assert (PyUnicode_KIND (string ) == PyUnicode_1BYTE_KIND );
2519
-
2520
- const Py_UCS1 * s = PyUnicode_1BYTE_DATA (string );
2519
+ str = PyUnicode_1BYTE_DATA (string );
2521
2520
for (Py_ssize_t i = 0 ; i < hexlen ; i ++ ) {
2522
- if (!Py_ISSPACE (s [i ])) {
2521
+ if (!Py_ISSPACE (str [i ])) {
2523
2522
real_len ++ ;
2524
2523
}
2525
2524
}
@@ -2529,7 +2528,6 @@ _PyBytes_FromHex(PyObject *string, int use_bytearray)
2529
2528
_PyBytesWriter_Dealloc (& writer );
2530
2529
return NULL ;
2531
2530
}
2532
- str = PyUnicode_1BYTE_DATA (string );
2533
2531
2534
2532
/* This overestimates if there are spaces */
2535
2533
buf = _PyBytesWriter_Alloc (& writer , hexlen / 2 );
You can’t perform that action at this time.
0 commit comments