Skip to content

Commit

Permalink
fix _PyUnicode_CheckConsistency
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaraditya303 committed Dec 19, 2024
1 parent d829ed0 commit 5fd952e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,9 +707,10 @@ _PyUnicode_CheckConsistency(PyObject *op, int check_content)
CHECK(_PyUnicode_UTF8(op) != data);
}
}

#ifndef Py_GIL_DISABLED
if (_PyUnicode_UTF8(op) == NULL)
CHECK(compact->utf8_length == 0);
#endif
}

/* check that the best kind is used: O(n) operation */
Expand Down

0 comments on commit 5fd952e

Please sign in to comment.