From 5a0fa88289982428557150af5b2a98f076247197 Mon Sep 17 00:00:00 2001
From: Sylvain Munaut <246tnt@gmail.com>
Date: Thu, 19 Dec 2013 19:29:01 -0500
Subject: pmt: adds ability to handle unicode input with pmt_to_python.

---
 gnuradio-runtime/python/pmt/pmt_to_python.py | 1 +
 1 file changed, 1 insertion(+)

(limited to 'gnuradio-runtime/python/pmt/pmt_to_python.py')

diff --git a/gnuradio-runtime/python/pmt/pmt_to_python.py b/gnuradio-runtime/python/pmt/pmt_to_python.py
index e551f4e983..e4797f9d44 100644
--- a/gnuradio-runtime/python/pmt/pmt_to_python.py
+++ b/gnuradio-runtime/python/pmt/pmt_to_python.py
@@ -73,6 +73,7 @@ THE_TABLE = ( #python type, check pmt type, to python, from python
     (None, pmt.is_null, lambda x: None, lambda x: pmt.PMT_NIL),
     (bool, pmt.is_bool, pmt.to_bool, pmt.from_bool),
     (str, pmt.is_symbol, pmt.symbol_to_string, pmt.string_to_symbol),
+    (unicode, lambda x: False, None, lambda x: pmt.string_to_symbol(x.encode('utf-8'))),
     (int, pmt.is_integer, pmt.to_long, pmt.from_long),
     (long, pmt.is_uint64, lambda x: long(pmt.to_uint64(x)), pmt.from_uint64),
     (float, pmt.is_real, pmt.to_double, pmt.from_double),
-- 
cgit v1.2.3