public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/libftdi] rawhide: Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
@ 2026-08-11 11:53 Jitka Plesnikova
0 siblings, 0 replies; only message in thread
From: Jitka Plesnikova @ 2026-08-11 11:53 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/libftdi
Branch : rawhide
Commit : 7a90b25c6115d7cfdd2ea317d6f3a3c8bcbdf58f
Author : Jitka Plesnikova <jplesnik@redhat.com>
Date : 2026-07-28T15:29:18+02:00
Stats : +28/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/libftdi/c/7a90b25c6115d7cfdd2ea317d6f3a3c8bcbdf58f?branch=rawhide
Log:
Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
---
diff --git a/libftdi-swig45.patch b/libftdi-swig45.patch
new file mode 100644
index 0000000..6f267d5
--- /dev/null
+++ b/libftdi-swig45.patch
@@ -0,0 +1,21 @@
+diff -up libftdi1-1.5/python/ftdi1.i.swig45 libftdi1-1.5/python/ftdi1.i
+--- libftdi1-1.5/python/ftdi1.i.swig45 2026-07-28 09:34:18.344364413 +0200
++++ libftdi1-1.5/python/ftdi1.i 2026-07-28 09:34:18.347364489 +0200
+@@ -91,7 +91,7 @@ char * str2charp_size(PyObject* pyObj, i
+ "read_data(context) -> (return_code, buf)"
+ %enddef
+ %feature("autodoc", ftdi_read_data_docstring) ftdi_read_data;
+-%typemap(in,numinputs=1) (unsigned char *buf, int size) %{ $2 = PyInt_AsLong($input);$1 = (unsigned char*)malloc($2*sizeof(char)); %}
++%typemap(in,numinputs=1) (unsigned char *buf, int size) %{ $2 = PyLong_AsLong($input);$1 = (unsigned char*)malloc($2*sizeof(char)); %}
+ %typemap(argout,noblock=1) (unsigned char *buf, int size) {
+ if(result<0)
+ $2=0;
+@@ -136,7 +136,7 @@ char * str2charp_size(PyObject* pyObj, i
+ int ftdi_get_eeprom_value(struct ftdi_context *ftdi, enum ftdi_eeprom_value value_name, int* value);
+ %clear int* value;
+
+-%typemap(in,numinputs=1) (unsigned char *buf, int size) %{ $2 = PyInt_AsLong($input);$1 = (unsigned char*)malloc($2*sizeof(char)); %}
++%typemap(in,numinputs=1) (unsigned char *buf, int size) %{ $2 = PyLong_AsLong($input);$1 = (unsigned char*)malloc($2*sizeof(char)); %}
+ %typemap(argout,noblock=1) (unsigned char *buf, int size) {
+ if(result<0)
+ $2=0;
diff --git a/libftdi.spec b/libftdi.spec
index be43159..758795a 100644
--- a/libftdi.spec
+++ b/libftdi.spec
@@ -1,6 +1,6 @@
Name: libftdi
Version: 1.5
-Release: 26%{?dist}
+Release: 27%{?dist}
Summary: Library to program and control the FTDI USB controller
License: LGPL-2.1-only AND GPL-2.0-only AND GPL-2.0-or-later AND (GPL-2.0-only WITH eCos-exception-2.0) AND MIT AND BSD-2-Clause-Views
@@ -23,6 +23,9 @@ Patch3: libftdi-1.5-swig-4.3.patch
# http://developer.intra2net.com/git/?p=libftdi;a=commitdiff;h=3dc444f99bbc780f06ee6115c086e30f2dda471a
# http://developer.intra2net.com/git/?p=libftdi;a=commitdiff;h=de9f01ece34d2fe6e842e0250a38f4b16eda2429
Patch4: libftdi-1.5-cmake.patch
+# Replace removed Python 2 C API macros with Python 3 equivalents
+# for compatibility with SWIG 4.5.0
+Patch5: libftdi-swig45.patch
BuildRequires: cmake
BuildRequires: gcc
@@ -133,6 +136,9 @@ rm -f %{buildroot}%{_datadir}/doc/libftdipp1/example.conf
%changelog
+* Tue Jul 28 2026 Jitka Plesnikova <jplesnik@redhat.com> - 1.5-27
+- Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility
+
* Wed Jul 22 2026 Python Maint <python-maint@redhat.com> - 1.5-26
- Rebuilt for Python 3.15.0b4 ABI change
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-11 11:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-11 11:53 [rpms/libftdi] rawhide: Replace removed Python 2 C API macros for SWIG 4.5.0 compatibility Jitka Plesnikova
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox