summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib
diff options
context:
space:
mode:
authorEric Blossom2010-11-18 18:00:58 -0800
committerEric Blossom2010-11-18 23:02:55 -0800
commitd1d226abdede58231583369047861cd2216489e9 (patch)
tree35f79b576d432e337c264e4c4e7aa1011fd81147 /gnuradio-core/src/lib
parentf60c4420e1fdef24687ffed6baf4fd7fa5ca5cf8 (diff)
downloadgnuradio-d1d226abdede58231583369047861cd2216489e9.tar.gz
gnuradio-d1d226abdede58231583369047861cd2216489e9.tar.bz2
gnuradio-d1d226abdede58231583369047861cd2216489e9.zip
Disable items that require swig directors when building guile bindings.
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r--gnuradio-core/src/lib/general/gr_bin_statistics_f.i7
-rw-r--r--gnuradio-core/src/lib/general/gr_feval.i30
2 files changed, 13 insertions, 24 deletions
diff --git a/gnuradio-core/src/lib/general/gr_bin_statistics_f.i b/gnuradio-core/src/lib/general/gr_bin_statistics_f.i
index 5cec882f0..be98a464b 100644
--- a/gnuradio-core/src/lib/general/gr_bin_statistics_f.i
+++ b/gnuradio-core/src/lib/general/gr_bin_statistics_f.i
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -19,6 +19,9 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+// Directors are only supported in Python, Java and C#. gr_feval_dd uses directors
+#ifdef SWIGPYTHON
+
GR_SWIG_BLOCK_MAGIC(gr,bin_statistics_f);
gr_bin_statistics_f_sptr
@@ -40,3 +43,5 @@ private:
public:
~gr_bin_statistics_f();
};
+
+#endif
diff --git a/gnuradio-core/src/lib/general/gr_feval.i b/gnuradio-core/src/lib/general/gr_feval.i
index 843ca3f2a..c5522805d 100644
--- a/gnuradio-core/src/lib/general/gr_feval.i
+++ b/gnuradio-core/src/lib/general/gr_feval.i
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -43,6 +43,9 @@
*/
+// Directors are only supported in Python, Java and C#
+#ifdef SWIGPYTHON
+
// Enable SWIG directors for these classes
%feature("director") gr_py_feval_dd;
%feature("director") gr_py_feval_cc;
@@ -65,8 +68,8 @@
// catch (Swig::DirectorException &e) { std::cerr << e.getMessage(); SWIG_fail; }
//}
-#ifdef SWIGPYTHON
%{
+
// class that ensures we acquire and release the Python GIL
class ensure_py_gil_state {
@@ -77,19 +80,6 @@ public:
};
%}
-#endif
-
-#ifdef SWIGGUILE
-#if 0
-// FIXME: this is a bogus stub, just here so things build
-class ensure_py_gil_state {
-public:
- ensure_py_gil_state() { }
- ~ensure_py_gil_state() { }
-};
-#endif
-#warning "class ensure_py_gil_state needs to be implemented!"
-#endif
/*
* These are the real C++ base classes, however we don't want these exposed.
@@ -158,9 +148,7 @@ class gr_py_feval_dd : public gr_feval_dd
public:
double calleval(double x)
{
-#ifdef PYTHON
ensure_py_gil_state _lock;
-#endif
return eval(x);
}
};
@@ -170,9 +158,7 @@ class gr_py_feval_cc : public gr_feval_cc
public:
gr_complex calleval(gr_complex x)
{
-#ifdef PYTHON
ensure_py_gil_state _lock;
-#endif
return eval(x);
}
};
@@ -182,9 +168,7 @@ class gr_py_feval_ll : public gr_feval_ll
public:
long calleval(long x)
{
-#ifdef PYTHON
ensure_py_gil_state _lock;
-#endif
return eval(x);
}
};
@@ -194,9 +178,7 @@ class gr_py_feval : public gr_feval
public:
void calleval()
{
-#ifdef PYTHON
ensure_py_gil_state _lock;
-#endif
eval();
}
};
@@ -218,3 +200,5 @@ long gr_feval_ll_example(gr_feval_ll *f, long x);
%rename(feval_example) gr_feval_example;
void gr_feval_example(gr_feval *f);
+
+#endif // SWIGPYTHON