From 6dd7b27807494e37ebdb780bda7c7b8c4a703d9b Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Wed, 4 Aug 2021 20:19:43 -0400 Subject: [PATCH] Fix handling of Unicode docstrings --- 64d8a5d785e1.patch | 21 +++++++++++++++++++++ sip6.spec | 6 +++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 64d8a5d785e1.patch diff --git a/64d8a5d785e1.patch b/64d8a5d785e1.patch new file mode 100644 index 0000000..1e8df46 --- /dev/null +++ b/64d8a5d785e1.patch @@ -0,0 +1,21 @@ + +# HG changeset patch +# User Phil Thompson +# Date 1628096545 -3600 +# Node ID 64d8a5d785e187ca2d78a0f555a7c02a6eba23bc +# Parent b9f1ac6505a25ec2d4a04c0aa71ad2fc9a7c3c96 +Fixed a regression in the handling of Unicode docstrings. + +diff -r b9f1ac6505a2 -r 64d8a5d785e1 code_generator/gencode.c +--- a/code_generator/gencode.c Tue Jul 13 17:57:49 2021 +0100 ++++ b/code_generator/gencode.c Wed Aug 04 18:02:25 2021 +0100 +@@ -13638,7 +13638,7 @@ + if (isprint(c)) + fputc(c, fp); + else +- fprintf(fp, "\\x%02x", (int)c); ++ fprintf(fp, "\\%03o", (unsigned char)c); + + break; + } + diff --git a/sip6.spec b/sip6.spec index 0429815..3f57bfd 100644 --- a/sip6.spec +++ b/sip6.spec @@ -2,7 +2,7 @@ Name: sip6 Version: 6.1.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: SIP - Python/C++ Bindings Generator %py_provides python3-sip6 # Remove when F34 is EOL @@ -15,6 +15,7 @@ URL: https://www.riverbankcomputing.com/software/sip Source0: %{pypi_source} # Enable sip to work on Python 3.10 (already done upstream in next release) Patch0: python3.10.patch +Patch1: 64d8a5d785e1.patch BuildRequires: gcc BuildRequires: python3-devel @@ -50,6 +51,9 @@ Python bindings for wxWidgets.} %{python3_sitearch}/sipbuild/ %changelog +* Wed Aug 04 2021 Scott Talbert - 6.1.1-3 +- Fix handling of Unicode docstrings + * Fri Jul 23 2021 Fedora Release Engineering - 6.1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild