summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/include/gr_py_feval.h
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-runtime/include/gr_py_feval.h')
-rw-r--r--gnuradio-runtime/include/gr_py_feval.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/gnuradio-runtime/include/gr_py_feval.h b/gnuradio-runtime/include/gr_py_feval.h
new file mode 100644
index 0000000000..f2f6c801a8
--- /dev/null
+++ b/gnuradio-runtime/include/gr_py_feval.h
@@ -0,0 +1,51 @@
+#include <pmt/pmt.h>
+
+class gr_py_feval_dd : public gr_feval_dd
+{
+ public:
+ double calleval(double x)
+ {
+ ensure_py_gil_state _lock;
+ return eval(x);
+ }
+};
+
+class gr_py_feval_cc : public gr_feval_cc
+{
+ public:
+ gr_complex calleval(gr_complex x)
+ {
+ ensure_py_gil_state _lock;
+ return eval(x);
+ }
+};
+
+class gr_py_feval_ll : public gr_feval_ll
+{
+ public:
+ long calleval(long x)
+ {
+ ensure_py_gil_state _lock;
+ return eval(x);
+ }
+};
+
+class gr_py_feval : public gr_feval
+{
+ public:
+ void calleval()
+ {
+ ensure_py_gil_state _lock;
+ eval();
+ }
+};
+
+class gr_py_feval_p : public gr_feval_p
+{
+ public:
+ void calleval(pmt::pmt_t x)
+ {
+ ensure_py_gil_state _lock;
+ eval(x);
+ }
+};