|
From: | Marcus Müller |
Subject: | Re: [Discuss-gnuradio] SWIG std::vector<pmt::pmt_t> issue |
Date: | Tue, 2 Aug 2016 08:38:01 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 |
Hi Dave, that's a bit hard to tell without context; generally, Python can construct wrapper code for std::vector that makes those iterable, and handles the interna a bit different, but with PMTs the non-bracket method of access might work: your_vector_of_pmts_in_python.at(index) if that works, you can tell SWIG that your vector type should be an iterable; try going into your OOT's swig/ootname.i and add a %include <std_vector.i> pretty much at the beginneing, and make sure to have in your
%{%}: %{ #include <pmt/pmt.h> #include <vector> %}and further down, declare %template(ootname_vector_pmt_t) std::vector<pmt::pmt_t>; And then hope that SWIG does what you want :(
Best regards, Marcus On 01.08.2016 23:49, Dave NotTelling
wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |