diff options
author | Marcus Müller <marcus@hostalia.de> | 2020-06-19 11:07:54 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2020-06-19 11:07:54 +0200 |
commit | e76d04ca2f4f15e3b1a1ab2a81dd52c4e6d2472c (patch) | |
tree | 1d86f68fceed9cd7204d9a79e816dc06c15feaf4 /gnuradio-runtime/include/gnuradio/py_feval.h | |
parent | 98348e37209aa7daeb96fe5ead815e5b083dc6da (diff) | |
parent | 39311758cb1e6a7424d3213b3eb2c65c8c4dcfe1 (diff) |
Move from SWIG to Pybind11
Goodbye, and thanks for all the fish, SWIG.
Please refer to docs/PYBIND11.md for details on how to deal with Pybind.
Diffstat (limited to 'gnuradio-runtime/include/gnuradio/py_feval.h')
-rw-r--r-- | gnuradio-runtime/include/gnuradio/py_feval.h | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/gnuradio-runtime/include/gnuradio/py_feval.h b/gnuradio-runtime/include/gnuradio/py_feval.h deleted file mode 100644 index 50af37ec03..0000000000 --- a/gnuradio-runtime/include/gnuradio/py_feval.h +++ /dev/null @@ -1,86 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006,2013 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * SPDX-License-Identifier: GPL-3.0-or-later - * - */ - -#ifndef INCLUDED_GR_PY_FEVAL_H -#define INCLUDED_GR_PY_FEVAL_H - -#include <gnuradio/feval.h> -#include <Python.h> -#include <pmt/pmt.h> - -class ensure_py_gil_state -{ - PyGILState_STATE d_gstate; - -public: - ensure_py_gil_state() { d_gstate = PyGILState_Ensure(); } - ~ensure_py_gil_state() { PyGILState_Release(d_gstate); } -}; - -namespace gr { - -class GR_RUNTIME_API py_feval_dd : public feval_dd -{ -public: - double calleval(double x) - { - ensure_py_gil_state _lock; - return eval(x); - } - virtual ~py_feval_dd(){}; -}; - -class GR_RUNTIME_API py_feval_cc : public feval_cc -{ -public: - gr_complex calleval(gr_complex x) - { - ensure_py_gil_state _lock; - return eval(x); - } - virtual ~py_feval_cc(){}; -}; - -class GR_RUNTIME_API py_feval_ll : public feval_ll -{ -public: - long calleval(long x) - { - ensure_py_gil_state _lock; - return eval(x); - } - virtual ~py_feval_ll(){}; -}; - -class GR_RUNTIME_API py_feval : public feval -{ -public: - void calleval() - { - ensure_py_gil_state _lock; - eval(); - } - virtual ~py_feval(){}; -}; - -class GR_RUNTIME_API py_feval_p : public feval_p -{ -public: - void calleval(pmt::pmt_t x) - { - ensure_py_gil_state _lock; - eval(x); - } - virtual ~py_feval_p(){}; -}; - -} /* namespace gr */ - -#endif /* INCLUDED_GR_PY_FEVAL_H */ |