ltsmin: please private.test

* spot/ltsmin/Makefile.am, spot/ltsmin/spins_interface.hh: here.
* spot/ltsmin/spins_interface.cc: delete.
This commit is contained in:
Etienne Renault 2017-09-28 09:20:15 +02:00
parent 32b79818dc
commit f9b0044623
3 changed files with 9 additions and 34 deletions

View file

@ -39,7 +39,7 @@ libspotltsmin_la_LIBADD = \
$(top_builddir)/lib/libgnu.la \ $(top_builddir)/lib/libgnu.la \
$(LIBLTDL) -lpthread $(LIBLTDL) -lpthread
libspotltsmin_la_LDFLAGS = -no-undefined $(SYMBOLIC_LDFLAGS) libspotltsmin_la_LDFLAGS = -no-undefined $(SYMBOLIC_LDFLAGS)
libspotltsmin_la_SOURCES = ltsmin.cc spins_interface.cc libspotltsmin_la_SOURCES = ltsmin.cc
EXTRA_DIST = $(srcdir)/libspotltsmin.pc.in EXTRA_DIST = $(srcdir)/libspotltsmin.pc.in

View file

@ -1,32 +0,0 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2017 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 <http://www.gnu.org/licenses/>.
#include <spot/ltsmin/spins_interface.hh>
#include <ltdl.h>
namespace spot
{
spins_interface::~spins_interface()
{
lt_dlhandle h = (lt_dlhandle) handle;
if (h)
lt_dlclose(h);
lt_dlexit();
}
}

View file

@ -20,6 +20,7 @@
#pragma once #pragma once
#include <memory> #include <memory>
#include <ltdl.h>
namespace spot namespace spot
{ {
@ -51,7 +52,13 @@ namespace spot
const char* (*get_type_name)(int type); const char* (*get_type_name)(int type);
int (*get_type_value_count)(int type); int (*get_type_value_count)(int type);
const char* (*get_type_value_name)(int type, int value); const char* (*get_type_value_name)(int type, int value);
~spins_interface(); ~spins_interface()
{
lt_dlhandle h = (lt_dlhandle) handle;
if (h)
lt_dlclose(h);
lt_dlexit();
}
}; };
using spins_interface_ptr = std::shared_ptr<const spins_interface>; using spins_interface_ptr = std::shared_ptr<const spins_interface>;