From 7b1c5abe410470d25e49d0dadd265c430aaca1ec Mon Sep 17 00:00:00 2001
From: Josh Blum <josh@joshknows.com>
Date: Thu, 20 Oct 2011 22:36:24 -0700
Subject: pmt: fix #446 by putting pmt swig into namespace

---
 gruel/src/swig/pmt_swig.i | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

(limited to 'gruel/src/swig/pmt_swig.i')

diff --git a/gruel/src/swig/pmt_swig.i b/gruel/src/swig/pmt_swig.i
index 34c7d4b7cf..276d232a42 100644
--- a/gruel/src/swig/pmt_swig.i
+++ b/gruel/src/swig/pmt_swig.i
@@ -20,7 +20,6 @@
  * Boston, MA 02110-1301, USA.
  */
 
-%module pmt
 %include "std_string.i"
 %include "stdint.i"
 %{
@@ -33,7 +32,6 @@
 #include <iosfwd>
 #include <stdexcept>
 #include <gruel/pmt.h>
-using namespace pmt;
 %}
 
 ////////////////////////////////////////////////////////////////////////
@@ -55,10 +53,14 @@ using namespace pmt;
 }
 
 // Template intrusive_ptr for Swig to avoid dereferencing issues
-class pmt_base;
+namespace pmt{
+    class pmt_base;
+}
 //%import <intrusive_ptr.i>
 %import <gr_intrusive_ptr.i>
-%template(swig_int_ptr) boost::intrusive_ptr<pmt_base>;
+%template(swig_int_ptr) boost::intrusive_ptr<pmt::pmt_base>;
+
+namespace pmt{
 
 typedef boost::intrusive_ptr<pmt_base> pmt_t;
 
@@ -777,3 +779,5 @@ std::string pmt_serialize_str(pmt_t obj);
  * \brief Provide a simple string generating interface to pmt's deserialize function
  */
 pmt_t pmt_deserialize_str(std::string str);
+
+} //namespace pmt
-- 
cgit v1.2.3