commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 01/05: uhd: unexposed usrp_sink::get_device


From: git
Subject: [Commit-gnuradio] [gnuradio] 01/05: uhd: unexposed usrp_sink::get_device() and usrp_source::get_device() from SWIG
Date: Tue, 8 Jul 2014 21:27:47 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch maint
in repository gnuradio.

commit 8296c569c104cf7c23a84d42c5b7236306842799
Author: Nicholas Corgan <address@hidden>
Date:   Wed Jun 18 15:53:04 2014 -0700

    uhd: unexposed usrp_sink::get_device() and usrp_source::get_device() from 
SWIG
    
    * multi_usrp class is not exposed to SWIG, so function returned a 
SwigPyObject and caused a memory leak when Python exits
    * It is not practical to expose multi_usrp to SWIG, so simply tell SWIG to 
ignore it
---
 gr-uhd/include/gnuradio/uhd/usrp_sink.h   | 4 +++-
 gr-uhd/include/gnuradio/uhd/usrp_source.h | 4 +++-
 gr-uhd/swig/uhd_swig.i                    | 8 +++++++-
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/gr-uhd/include/gnuradio/uhd/usrp_sink.h 
b/gr-uhd/include/gnuradio/uhd/usrp_sink.h
index 35bb2e4..d3e732c 100644
--- a/gr-uhd/include/gnuradio/uhd/usrp_sink.h
+++ b/gr-uhd/include/gnuradio/uhd/usrp_sink.h
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2010-2013 Free Software Foundation, Inc.
+ * Copyright 2010-2014 Free Software Foundation, Inc.
  *
  * This file is part of GNU Radio
  *
@@ -528,6 +528,8 @@ namespace gr {
 
       /*!
        * Get access to the underlying uhd device object.
+       *
+       * NOTE: This function is only available in C++.
        * \return the multi usrp device object
        */
       virtual ::uhd::usrp::multi_usrp::sptr get_device(void) = 0;
diff --git a/gr-uhd/include/gnuradio/uhd/usrp_source.h 
b/gr-uhd/include/gnuradio/uhd/usrp_source.h
index f330ee0..2e165cf 100644
--- a/gr-uhd/include/gnuradio/uhd/usrp_source.h
+++ b/gr-uhd/include/gnuradio/uhd/usrp_source.h
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2010-2013 Free Software Foundation, Inc.
+ * Copyright 2010-2014 Free Software Foundation, Inc.
  *
  * This file is part of GNU Radio
  *
@@ -535,6 +535,8 @@ namespace gr {
 
       /*!
        * Get access to the underlying uhd device object.
+       *
+       * NOTE: This function is only available in C++.
        * \return the multi usrp device object
        */
       virtual ::uhd::usrp::multi_usrp::sptr get_device(void) = 0;
diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i
index 4eaef91..a4b1528 100644
--- a/gr-uhd/swig/uhd_swig.i
+++ b/gr-uhd/swig/uhd_swig.i
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2010-2013 Free Software Foundation, Inc.
+ * Copyright 2010-2014 Free Software Foundation, Inc.
  *
  * This file is part of GNU Radio
  *
@@ -40,6 +40,12 @@
 %include "uhd_swig_doc.i"
 
 ////////////////////////////////////////////////////////////////////////
+// SWIG should not see the uhd::usrp::multi_usrp class
+////////////////////////////////////////////////////////////////////////
+%ignore gr::uhd::usrp_sink::get_device;
+%ignore gr::uhd::usrp_source::get_device;
+
+////////////////////////////////////////////////////////////////////////
 // block headers
 ////////////////////////////////////////////////////////////////////////
 %{



reply via email to

[Prev in Thread] Current Thread [Next in Thread]