Re: [Discuss-gnuradio] Q's regarding C++ <-> SWIG <-> Python

2006-07-09 Thread Michael Dickens
Yes yes, standard C++ ;-) In the context of how SWIG interprets the declarations for the friend method(s), that's my question. I tried having the last 3 arguments of the friend method have defaults (of 7, so 4 required, 3 optional), but then the instantiation from Python doesn't work. Could be

Re: [Discuss-gnuradio] Q's regarding C++ <-> SWIG <-> Python

2006-07-07 Thread Eric Blossom
On Fri, Jul 07, 2006 at 10:31:43PM -0400, Michael Dickens wrote: > > OK. So what's the difference between: > > const std::vector &taps > and > const std::vector taps > > in terms of the way Python -> SWIG -> C++ works? Using the default typemaps that convert Python lists/tuples to

Re: [Discuss-gnuradio] Q's regarding C++ <-> SWIG <-> Python

2006-07-07 Thread Michael Dickens
Take a look at this: GR_SWIG_BLOCK_MAGIC(gr,fir_filter_fff); gr_fir_filter_fff_sptr gr_make_fir_filter_fff (int decimation, const std::vector &taps); class gr_fir_filter_fff : public gr_sync_decimator { private: gr_fir_filter_fff (int decimation, const std::vector

Re: [Discuss-gnuradio] Q's regarding C++ <-> SWIG <-> Python

2006-07-07 Thread Eric Blossom
On Fri, Jul 07, 2006 at 07:24:26PM -0400, Michael Dickens wrote: > It seems like the "usual" C constructs port easily between C++ / > SWIG / Python: char, short, int, long, float, double. I'm fine in C+ > +, but SWIG and Python are new to me, and combining them I generally > take to be an SEP

[Discuss-gnuradio] Q's regarding C++ <-> SWIG <-> Python

2006-07-07 Thread Michael Dickens
It seems like the "usual" C constructs port easily between C++ / SWIG / Python: char, short, int, long, float, double. I'm fine in C+ +, but SWIG and Python are new to me, and combining them I generally take to be an SEP ("someone else's problem", thanks Douglas Adams). Given my time const