From 7a8a4f4d77c5440ecfcad513e1eefb075db772be Mon Sep 17 00:00:00 2001 From: Etienne Renault Date: Mon, 18 Feb 2019 14:08:36 +0100 Subject: [PATCH] ltdl: should not appear in public headers * spot/ltsmin/Makefile.am, spot/ltsmin/spins_interface.hh, spot/ltsmin/spins_interface.cc: here. --- spot/ltsmin/Makefile.am | 4 ++-- spot/ltsmin/spins_interface.cc | 33 +++++++++++++++++++++++++++++++++ spot/ltsmin/spins_interface.hh | 11 ++--------- 3 files changed, 37 insertions(+), 11 deletions(-) create mode 100644 spot/ltsmin/spins_interface.cc diff --git a/spot/ltsmin/Makefile.am b/spot/ltsmin/Makefile.am index 8d5fcb1dc..e42bc730e 100644 --- a/spot/ltsmin/Makefile.am +++ b/spot/ltsmin/Makefile.am @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -## Copyright (C) 2011, 2013, 2014, 2015, 2016, 2017, 2018 Laboratoire de +## Copyright (C) 2011, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Laboratoire de ## Recherche et Developpement de l'Epita (LRDE). ## ## This file is part of Spot, a model checking library. @@ -39,7 +39,7 @@ libspotltsmin_la_LIBADD = \ $(top_builddir)/lib/libgnu.la \ $(LIBLTDL) -lpthread libspotltsmin_la_LDFLAGS = -no-undefined $(SYMBOLIC_LDFLAGS) -libspotltsmin_la_SOURCES = ltsmin.cc +libspotltsmin_la_SOURCES = spins_interface.cc ltsmin.cc EXTRA_DIST = $(srcdir)/libspotltsmin.pc.in diff --git a/spot/ltsmin/spins_interface.cc b/spot/ltsmin/spins_interface.cc new file mode 100644 index 000000000..ce4e8f9a8 --- /dev/null +++ b/spot/ltsmin/spins_interface.cc @@ -0,0 +1,33 @@ +// -*- coding: utf-8 -*- +// Copyright (C) 2019 Laboratoire de Recherche et Développement de +// l'Epita (LRDE) +// +// This file is part of Spot, a model checking library. +// +// Spot is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// (at your option) any later version. +// +// Spot is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +// License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +#include +#include +#include + +namespace spot +{ + spins_interface::~spins_interface() + { + lt_dlhandle h = (lt_dlhandle) handle; + if (h) + lt_dlclose(h); + lt_dlexit(); + } +} diff --git a/spot/ltsmin/spins_interface.hh b/spot/ltsmin/spins_interface.hh index 0660f15f5..8983a8eea 100644 --- a/spot/ltsmin/spins_interface.hh +++ b/spot/ltsmin/spins_interface.hh @@ -1,5 +1,5 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2017 Laboratoire de Recherche et Développement de +// Copyright (C) 2017, 2019 Laboratoire de Recherche et Développement de // l'Epita (LRDE) // // This file is part of Spot, a model checking library. @@ -20,7 +20,6 @@ #pragma once #include -#include namespace spot { @@ -52,13 +51,7 @@ namespace spot const char* (*get_type_name)(int type); int (*get_type_value_count)(int type); const char* (*get_type_value_name)(int type, int value); - ~spins_interface() - { - lt_dlhandle h = (lt_dlhandle) handle; - if (h) - lt_dlclose(h); - lt_dlexit(); - } + ~spins_interface(); }; using spins_interface_ptr = std::shared_ptr;