c6f87e9
From 4677b0268a0f323f659590a15da9e5851298522d Mon Sep 17 00:00:00 2001
c6f87e9
From: William S Fulton <wsf@fultondesigns.co.uk>
c6f87e9
Date: Fri, 19 Jan 2024 07:43:26 +0000
c6f87e9
Subject: [PATCH] Update swig_type_info for swig-4.2.0
c6f87e9
c6f87e9
swig-4.2.0 changed the mangling for templates with default parameters.
c6f87e9
This commit updates the swig_type_info names for swig-4.2.0, but keeps the code backwards compatible to work with older versions of SWIG.
c6f87e9
---
c6f87e9
 copasi/bindings/common/downcast_common.cpp | 6 +++---
c6f87e9
 1 file changed, 3 insertions(+), 3 deletions(-)
c6f87e9
c6f87e9
diff --git a/copasi/bindings/common/downcast_common.cpp b/copasi/bindings/common/downcast_common.cpp
c6f87e9
index dd98787480..325dfcff8f 100644
c6f87e9
--- a/copasi/bindings/common/downcast_common.cpp
c6f87e9
+++ b/copasi/bindings/common/downcast_common.cpp
c6f87e9
@@ -285,7 +285,7 @@ GetDowncastSwigTypeForCDataContainer(CDataContainer* container)
c6f87e9
     }
c6f87e9
   else if (dynamic_cast<ReportItemVector*>(container))
c6f87e9
     {
c6f87e9
-#ifdef SWIGPERL
c6f87e9
+#if defined(SWIGPERL) || SWIG_VERSION >= 0x040200
c6f87e9
       pInfo = SWIGTYPE_p_std__vectorT_CRegisteredCommonName_t;
c6f87e9
 #else
c6f87e9
       pInfo = SWIGTYPE_p_std__vectorT_CRegisteredCommonName_std__allocatorT_CRegisteredCommonName_t_t;
c6f87e9
@@ -293,7 +293,7 @@ GetDowncastSwigTypeForCDataContainer(CDataContainer* container)
c6f87e9
     }
c6f87e9
   else if (dynamic_cast<ParameterVector*>(container))
c6f87e9
     {
c6f87e9
-#ifdef SWIGPERL
c6f87e9
+#if defined(SWIGPERL) || SWIG_VERSION >= 0x040200
c6f87e9
       pInfo = SWIGTYPE_p_std__vectorT_CCopasiParameter_p_t;
c6f87e9
 #else
c6f87e9
       pInfo = SWIGTYPE_p_std__vectorT_CCopasiParameter_p_std__allocatorT_CCopasiParameter_p_t_t;
c6f87e9
@@ -301,7 +301,7 @@ GetDowncastSwigTypeForCDataContainer(CDataContainer* container)
c6f87e9
     }
c6f87e9
   else if (dynamic_cast<CFunctionStdVector*>(container))
c6f87e9
     {
c6f87e9
-#ifdef SWIGPERL
c6f87e9
+#if defined(SWIGPERL) || SWIG_VERSION >= 0x040200
c6f87e9
       pInfo = SWIGTYPE_p_std__vectorT_CFunction_p_t;
c6f87e9
 #else
c6f87e9
       pInfo = SWIGTYPE_p_std__vectorT_CFunction_p_std__allocatorT_CFunction_p_t_t;