aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Friedrich Bolz-Tereick <cfbolz@gmx.de>2022-12-03 14:16:10 +0100
committerCarl Friedrich Bolz-Tereick <cfbolz@gmx.de>2022-12-03 14:16:10 +0100
commit88a55e2e7f86fc20d42c1b6aa2c4596436928e00 (patch)
treeda0e27bb17255d5ccd8810d0430069f286608be7
parentfix corner cases, should probably upstream to CPython (diff)
downloadpypy-88a55e2e7f86fc20d42c1b6aa2c4596436928e00.tar.gz
pypy-88a55e2e7f86fc20d42c1b6aa2c4596436928e00.tar.bz2
pypy-88a55e2e7f86fc20d42c1b6aa2c4596436928e00.zip
(cfbolz, arigo pointing at the problem): somewhat blindly apply an equivalent
fix to b52ad0d2a5b1 to the windows path of the code
-rw-r--r--pypy/module/time/interp_time.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pypy/module/time/interp_time.py b/pypy/module/time/interp_time.py
index 990aac55eb..24941a44ba 100644
--- a/pypy/module/time/interp_time.py
+++ b/pypy/module/time/interp_time.py
@@ -1021,7 +1021,8 @@ def strftime(space, format, w_tup=None):
raise oefmt(space.w_ValueError, "invalid format string")
i += 1
# wcharp with track_allocation=True
- format_for_call = rffi.utf82wcharp(format, len(format))
+ format_for_call = rffi.utf82wcharp(
+ format, codepoints_in_utf8(format))
else:
try:
format_for_call = utf8_encode_locale_surrogateescape(