Handle error when PyUnicode_GetLength returns a negative value. (GH-28859)

(cherry picked from commit 560a79f94e94de66a18f2a5e4194c2fe51e2adf1)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
1 file changed