-// Copyright (C) 2019-2021 EDF R&D
+// Copyright (C) 2019-2023 EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
#ifndef PY2CPP_PYPTR_HXX
#define PY2CPP_PYPTR_HXX
+#include "py2cppExports.hxx"
#include <Python.h>
#include <memory>
#include <string>
namespace py2cpp
{
-class PyPtrDeleter
+class PY2CPP_EXPORT PyPtrDeleter
{
public:
void operator()(PyObject * po){Py_DECREF(po);}
typedef std::unique_ptr<PyObject, PyPtrDeleter> _PyPtr;
-class PyPtr: public _PyPtr
+class PY2CPP_EXPORT PyPtr: public _PyPtr
{
public:
PyPtr();
std::string repr()const;
};
-class AutoGIL
+class PY2CPP_EXPORT AutoGIL
{
public:
AutoGIL():_gstate(PyGILState_Ensure()) { }