From 391372ae2a78f95de13cbedf769421eacf835257 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Fri, 22 Jan 2010 17:29:12 +0100 Subject: [PATCH] Turn parse_error_list into an opaque type for Swig. This kills a memory leak warning from swig/python. * src/ltlparse/public.hh (parse_error_list): Declare as an empty struct for Swig. * wrap/python/tests/ltlparse.py: Fix copyright. --- ChangeLog | 9 +++++++++ src/ltlparse/public.hh | 8 +++++++- wrap/python/spot.i | 4 +++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86bffe0ed..5cb6edadc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-01-22 Alexandre Duret-Lutz + + Turn parse_error_list into an opaque type for Swig. This + kills a memory leak warning from swig/python. + + * src/ltlparse/public.hh (parse_error_list): Declare + as an empty struct for Swig. + * wrap/python/tests/ltlparse.py: Fix copyright. + 2010-01-22 Alexandre Duret-Lutz Fix the computation of the length of multops. diff --git a/src/ltlparse/public.hh b/src/ltlparse/public.hh index 8e5daa819..843036da7 100644 --- a/src/ltlparse/public.hh +++ b/src/ltlparse/public.hh @@ -1,3 +1,5 @@ +// Copyright (C) 2010 Laboratoire de Recherche et Développement de +// l'Epita (LRDE). // Copyright (C) 2003, 2004, 2005, 2006 Laboratoire d'Informatique de // Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC), // Université Pierre et Marie Curie. @@ -40,11 +42,15 @@ namespace spot /// \addtogroup ltl_io /// @{ +#ifndef SWIG /// \brief A parse diagnostic with its location. typedef std::pair parse_error; /// \brief A list of parser diagnostics, as filled by parse. typedef std::list parse_error_list; - +#else + // Turn parse_error_list into an opaque type for Swig. + struct parse_error_list {}; +#endif /// \brief Build a formula from an LTL string. /// \param ltl_string The string to parse. diff --git a/wrap/python/spot.i b/wrap/python/spot.i index 81d52f25c..bc7d43c1f 100644 --- a/wrap/python/spot.i +++ b/wrap/python/spot.i @@ -1,4 +1,6 @@ -// Copyright (C) 2003, 2004, 2005, 2006, 2009 Laboratoire d'Informatique +// Copyright (C) 2009 Laboratoire de Recherche et Développement +// de l'Epita (LRDE). +// Copyright (C) 2003, 2004, 2005, 2006 Laboratoire d'Informatique // de Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC), // Université Pierre et Marie Curie. //