From afc70e2539ca57df2e0113d5e60637ecf99e7aab Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Sun, 25 May 2025 11:55:59 +0200 Subject: [PATCH] Move includes in the files where they are used Makes the other files less dependent on being included by hamlib.swg and more self-contained. Need to explicitly add %include for amplist.h, riglist.h, rotlist.h to have the definitions picked up by SWIG even if they are included by their main file. --- bindings/amplifier.swg | 6 ++++++ bindings/hamlib.swg | 12 ------------ bindings/rig.swg | 6 ++++++ bindings/rotator.swg | 6 ++++++ 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/bindings/amplifier.swg b/bindings/amplifier.swg index bc49490fb..962611feb 100644 --- a/bindings/amplifier.swg +++ b/bindings/amplifier.swg @@ -19,6 +19,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ +%{ +#include +%} + +%include +%include %inline %{ diff --git a/bindings/hamlib.swg b/bindings/hamlib.swg index e07dd0010..bdeb876bc 100644 --- a/bindings/hamlib.swg +++ b/bindings/hamlib.swg @@ -29,9 +29,6 @@ #include -#include -#include -#include //mdblack98 -- Commented this out -- is anybody using the functions in misc.h? //If so, then those functions should be moved to rig.h //#include "misc.h" @@ -222,15 +219,6 @@ %include -%include -%include - -%include -%include - -%include -%include - %inline { typedef const char * const_char_string; } diff --git a/bindings/rig.swg b/bindings/rig.swg index a101d1575..3f8692bfc 100644 --- a/bindings/rig.swg +++ b/bindings/rig.swg @@ -18,6 +18,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ +%{ +#include +%} + +%include +%include %inline %{ diff --git a/bindings/rotator.swg b/bindings/rotator.swg index 2e527fcef..90d07c281 100644 --- a/bindings/rotator.swg +++ b/bindings/rotator.swg @@ -18,6 +18,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ +%{ +#include +%} + +%include +%include %inline %{