36 lines
1.8 KiB
Diff
36 lines
1.8 KiB
Diff
From f6b1efbd6b3876537a25e7008bbf35254a1c55c7 Mon Sep 17 00:00:00 2001
|
|
From: fuzzard <fuzzard@kodi.tv>
|
|
Date: Mon, 1 Jan 2024 19:57:30 +1000
|
|
Subject: [PATCH] [swig] Fix building with Swig 4.2.0
|
|
|
|
swig 4.2.0 introduced a change that adds a constructor to the generated AddonModuleXbmcaddon.i.cpp
|
|
file. This causes failures such as
|
|
|
|
build/swig/AddonModuleXbmcaddon.i.cpp: In function 'PyObject* PythonBindings::xbmcaddon_XBMCAddon_xbmcaddon_Settings_New(PyTypeObject*, PyObject*, PyObject*)':
|
|
build/swig/AddonModuleXbmcaddon.i.cpp:1751:52: error: no matching function for call to 'XBMCAddon::xbmcaddon::Settings::Settings()'
|
|
1751 | apiResult = new XBMCAddon::xbmcaddon::Settings();
|
|
| ^
|
|
In file included from ../xbmc/interfaces/legacy/Addon.h:14,
|
|
from build/swig/AddonModuleXbmcaddon.i.cpp:30:
|
|
../xbmc/interfaces/legacy/Settings.h:58:3: note: candidate: 'XBMCAddon::xbmcaddon::Settings::Settings(std::shared_ptr<CSettingsBase>)'
|
|
58 | Settings(std::shared_ptr<CSettingsBase> settings);
|
|
| ^~~~~~~~
|
|
../xbmc/interfaces/legacy/Settings.h:58:3: note: candidate expects 1 argument, 0 provided
|
|
|
|
If we disable the contructor for Settings, we get the same generated output as swig <=4.1.1
|
|
---
|
|
xbmc/interfaces/swig/AddonModuleXbmcaddon.i | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/xbmc/interfaces/swig/AddonModuleXbmcaddon.i b/xbmc/interfaces/swig/AddonModuleXbmcaddon.i
|
|
index 6c00a1caa2f5a..d38794c043377 100644
|
|
--- a/xbmc/interfaces/swig/AddonModuleXbmcaddon.i
|
|
+++ b/xbmc/interfaces/swig/AddonModuleXbmcaddon.i
|
|
@@ -33,5 +33,6 @@ using namespace xbmcaddon;
|
|
%include "interfaces/legacy/AddonString.h"
|
|
|
|
%include "interfaces/legacy/Addon.h"
|
|
+%nodefaultctor Settings;
|
|
%include "interfaces/legacy/Settings.h"
|
|
|