From 2788c5c4e118625ffa5f88312cc3bc4c5bd2cb1f Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 21 Jul 2020 23:57:33 -0400 Subject: [PATCH] bpo-41366: Fix clang warning for sign conversion Affects 3.9 beta and master --- Include/cpython/unicodeobject.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Include/cpython/unicodeobject.h b/Include/cpython/unicodeobject.h index 615b4a971d5f47..300408cb262991 100644 --- a/Include/cpython/unicodeobject.h +++ b/Include/cpython/unicodeobject.h @@ -52,7 +52,7 @@ Py_DEPRECATED(3.3) static inline void Py_UNICODE_COPY(Py_UNICODE *target, const Py_UNICODE *source, Py_ssize_t length) { - memcpy(target, source, length * sizeof(Py_UNICODE)); + memcpy(target, source, (size_t)(length) * sizeof(Py_UNICODE)); } Py_DEPRECATED(3.3) static inline void