From 954ec85ace9ac262eee67a7e7fc9b6a933a5e5fb Mon Sep 17 00:00:00 2001 From: 15859157387 <977713017@qq.com> Date: Tue, 24 Oct 2023 10:28:32 +0800 Subject: [PATCH] fix bug for no matching function --- 0002-fix-bug-no-matching-function.patch | 25 +++++++++++++++++++++++++ swig.spec | 6 +++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 0002-fix-bug-no-matching-function.patch diff --git a/0002-fix-bug-no-matching-function.patch b/0002-fix-bug-no-matching-function.patch new file mode 100644 index 0000000..384774d --- /dev/null +++ b/0002-fix-bug-no-matching-function.patch @@ -0,0 +1,25 @@ +From d7f1cd2a91f5004086fcc0246b0d4194e32d447c Mon Sep 17 00:00:00 2001 +From: 15859157387 <977713017@qq.com> +Date: Tue, 24 Oct 2023 10:18:07 +0800 +Subject: [PATCH] fix swig bug + +--- + Lib/ocaml/ocamlrun.swg | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Lib/ocaml/ocamlrun.swg b/Lib/ocaml/ocamlrun.swg +index 5a923c5..53ad952 100644 +--- a/Lib/ocaml/ocamlrun.swg ++++ b/Lib/ocaml/ocamlrun.swg +@@ -369,7 +369,7 @@ extern "C" { + if( !p || len < 0 ) CAMLreturn(caml_val_ptr( (void *)p, 0 )); + vv = caml_swig_alloc(1,C_string); + SWIG_Store_field(vv,0,caml_alloc_string(len)); +- memcpy(String_val(SWIG_Field(vv,0)),p,len); ++ memcpy(Bp_val(SWIG_Field(vv,0)),p,len); + CAMLreturn(vv); + } + +-- +2.27.0 + diff --git a/swig.spec b/swig.spec index d5d9c90..dba131c 100644 --- a/swig.spec +++ b/swig.spec @@ -1,6 +1,6 @@ Name: swig Version: 4.0.2 -Release: 6 +Release: 7 Summary: Links C/C++/Objective C to languages for some advanced programing License: GPLv3+ and BSD URL: http://swig.sourceforge.net/ @@ -13,6 +13,7 @@ Patch3: backport-configure.ac-Add-missing-shell-quoting.patch Patch4: Backport-php-8-support-from-upstream.patch Patch5: 0001-Ruby-Fix-deprecation-warnings-with-Ruby-3.x.patch Patch6: 0001-gcc-12-warning-fix-in-test-case.patch +Patch7: 0002-fix-bug-no-matching-function.patch BuildRequires: perl-interpreter pcre2-devel python3-devel autoconf automake gawk dos2unix BuildRequires: gcc-c++ help2man perl-devel perl(base) perl(Config) perl(Devel::Peek) @@ -106,6 +107,9 @@ install -pm 644 Tools/swig.gdb %{buildroot}%{_datadir}/%{name}/gdb %{_mandir}/man1/swig.1* %changelog +* Tue Oct 24 2023 renyi <977713017@qq.com> - 4.0.2-7 +- Fix an unmatched function error + * Thu Jul 13 2023 chenchen - 4.0.2-6 - fix build error caused by upgrading gcc to 12.3.0 -- Gitee