public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: Fix excessive reference counting on faked string .decode()
@ 2026-11-23 9:32 Panu Matilainen
0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-11-23 9:32 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : c7bd807f7c9d21e9edcf015236411fc214fd263e
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2019-04-11T10:38:45+03:00
Stats : +5/-3 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/c7bd807f7c9d21e9edcf015236411fc214fd263e?branch=pmatilai-v6
Log:
Fix excessive reference counting on faked string .decode()
---
diff --git a/0001-Monkey-patch-.decode-method-to-our-strings-as-a-temp.patch b/0001-Monkey-patch-.decode-method-to-our-strings-as-a-temp.patch
index e655848..6df9fab 100644
--- a/0001-Monkey-patch-.decode-method-to-our-strings-as-a-temp.patch
+++ b/0001-Monkey-patch-.decode-method-to-our-strings-as-a-temp.patch
@@ -52,7 +52,7 @@ diff --git a/python/rpmsystem-py.h b/python/rpmsystem-py.h
index 25938464a..803da0fc1 100644
--- a/python/rpmsystem-py.h
+++ b/python/rpmsystem-py.h
-@@ -19,12 +19,30 @@
+@@ -19,12 +19,29 @@
#define PyInt_AsSsize_t PyLong_AsSsize_t
#endif
@@ -76,7 +76,6 @@ index 25938464a..803da0fc1 100644
+ Py_DECREF(n);
+ }
+ if (fakedecode && o) {
-+ Py_INCREF(fakedecode);
+ /* monkey-patch it into the string object as "decode" */
+ PyDict_SetItemString(Py_TYPE(o)->tp_dict, "decode", fakedecode);
+ }
diff --git a/rpm.spec b/rpm.spec
index 11c05da..5abd401 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -23,7 +23,7 @@
%global rpmver 4.14.2.1
#global snapver rc2
-%global rel 6
+%global rel 7
%global srcver %{version}%{?snapver:-%{snapver}}
%global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x}
@@ -576,6 +576,9 @@ make check || (cat tests/rpmtests.log; exit 1)
%doc doc/librpm/html/*
%changelog
+* Thu Apr 11 2019 Panu Matilainen <pmatilai@redhat.com> - 4.14.2.1-7
+- Fix excessive reference counting on faked string .decode()
+
* Wed Apr 10 2019 Panu Matilainen <pmatilai@redhat.com> - 4.14.2.1-6
- Unbreak Python 3 API by returning string data as surrogate-escaped utf-8
string objects instead of bytes (#1693751)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 9:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 9:32 [rpms/rpm] pmatilai-v6: Fix excessive reference counting on faked string .decode() Panu Matilainen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox