[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] SWIG, current gr-howto structure and exception specif
[Discuss-gnuradio] SWIG, current gr-howto structure and exception specifiers
Fri, 11 May 2012 13:03:31 +0200
In the current state of gr-howto (which is also used in gr_modtool), the
SWIG stuff is done pretty intelligently by using the header files as
.i-files, which means there is no need to write a SWIG header for every
One advantage of this was the possibility to add stuff in the .i-file
which weren't in the .h-file; specifically, exception specifiers.
Example (from gr-specest, specest_welch.i):
specest_make_welch(unsigned fft_len, int overlap, int ma_len, bool fft_shift,
const std::vector<float> &window)
// And so on .
If I don't declare the exception specifier, I can't catch the exception
in Python. If I simply include specest_welch.h in specest_swig.i, I need
to add the specifiers in the C++-code, which is not very popular (and I
think not future-compatible, and gcc doesn't handle that well).
Here's my question: is there a cool way to have SWIG know about the
exceptions without having to write a .i-file for every block that uses
exceptions? Can I 'tag' the source code in a way that gcc doesn't care,
but SWIG does?
Thanks for any nice ideas!
Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)
Dipl.-Ing. Martin Braun
Phone: +49 721 608-43790
Fax: +49 721 608-46071
KIT -- University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association
Description: PGP signature
|[Prev in Thread]
||[Next in Thread]|
- [Discuss-gnuradio] SWIG, current gr-howto structure and exception specifiers,
Martin Braun <=