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.
This commit is contained in:
Alexandre Duret-Lutz 2010-01-22 17:29:12 +01:00
parent 0fe5403956
commit 391372ae2a
3 changed files with 19 additions and 2 deletions

View file

@ -1,3 +1,12 @@
2010-01-22 Alexandre Duret-Lutz <adl@lrde.epita.fr>
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 <adl@lrde.epita.fr> 2010-01-22 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Fix the computation of the length of multops. Fix the computation of the length of multops.

View file

@ -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 // Copyright (C) 2003, 2004, 2005, 2006 Laboratoire d'Informatique de
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC), // Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
// Université Pierre et Marie Curie. // Université Pierre et Marie Curie.
@ -40,11 +42,15 @@ namespace spot
/// \addtogroup ltl_io /// \addtogroup ltl_io
/// @{ /// @{
#ifndef SWIG
/// \brief A parse diagnostic with its location. /// \brief A parse diagnostic with its location.
typedef std::pair<ltlyy::location, std::string> parse_error; typedef std::pair<ltlyy::location, std::string> parse_error;
/// \brief A list of parser diagnostics, as filled by parse. /// \brief A list of parser diagnostics, as filled by parse.
typedef std::list<parse_error> parse_error_list; typedef std::list<parse_error> 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. /// \brief Build a formula from an LTL string.
/// \param ltl_string The string to parse. /// \param ltl_string The string to parse.

View file

@ -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), // de Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
// Université Pierre et Marie Curie. // Université Pierre et Marie Curie.
// //