From: jcorgan Date: Tue, 10 Feb 2009 04:53:37 +0000 (+0000) Subject: Merged r10385:10413 from michaelld/swig_tweaks into trunk. Passes distcheck. X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=7783dc88c6acf839b59c7c3358094f85e0012ada;p=debian%2Fgnuradio Merged r10385:10413 from michaelld/swig_tweaks into trunk. Passes distcheck. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10414 221aa14e-8319-0410-a670-987f0aec2ac5 --- diff --git a/gnuradio-core/src/lib/runtime/Makefile.am b/gnuradio-core/src/lib/runtime/Makefile.am index b21b3241..cc8da49d 100644 --- a/gnuradio-core/src/lib/runtime/Makefile.am +++ b/gnuradio-core/src/lib/runtime/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright 2003,2004,2007,2008 Free Software Foundation, Inc. +# Copyright 2003,2004,2007,2008,2009 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -152,7 +152,6 @@ swiginclude_HEADERS = \ gr_sync_block.i \ gr_sync_decimator.i \ gr_sync_interpolator.i \ - gr_swig_block_magic.i \ gr_top_block.i \ runtime.i diff --git a/gnuradio-core/src/lib/runtime/gr_swig_block_magic.i b/gnuradio-core/src/lib/runtime/gr_swig_block_magic.i deleted file mode 100644 index 083d6068..00000000 --- a/gnuradio-core/src/lib/runtime/gr_swig_block_magic.i +++ /dev/null @@ -1,45 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -%define GR_SWIG_BLOCK_MAGIC(PKG, BASE_NAME) -_GR_SWIG_BLOCK_MAGIC_HELPER(PKG, PKG ## _ ## BASE_NAME, BASE_NAME) -%enddef - -%define _GR_SWIG_BLOCK_MAGIC_HELPER(PKG, NAME, BASE_NAME) -class NAME; -typedef boost::shared_ptr NAME ## _sptr; -%template(NAME ## _sptr) boost::shared_ptr; -%rename(BASE_NAME) PKG ## _make_ ## BASE_NAME; -%inline { - gr_block_sptr NAME ## _block (NAME ## _sptr r) - { - return gr_block_sptr (r); - } -} - -%pythoncode %{ -NAME ## _sptr.block = lambda self: NAME ## _block (self) -NAME ## _sptr.__repr__ = lambda self: "" % (self.name(), self.unique_id ()) -%} - -%ignore NAME; -%enddef diff --git a/gnuradio-core/src/lib/swig/Makefile.am b/gnuradio-core/src/lib/swig/Makefile.am index d468b41a..98c03219 100644 --- a/gnuradio-core/src/lib/swig/Makefile.am +++ b/gnuradio-core/src/lib/swig/Makefile.am @@ -35,11 +35,13 @@ EXTRA_DIST = gen-swig-bug-fix LOCAL_IFILES = \ gnuradio.i \ - shared_ptr.i \ + gr_swig_block_magic.i \ + gr_shared_ptr.i \ sw_general.i \ sw_gengen.i \ sw_filter.i \ - sw_io.i + sw_io.i \ + sw_runtime.i ALL_IFILES = \ $(LOCAL_IFILES) @@ -99,7 +101,7 @@ _gnuradio_swig_py_io_la_CXXFLAGS = @swig_CXXFLAGS@ # ---------------------------------------------------------------- -# Part 1: gnuradio.i -> gnuradio_swig_py_runtime +# Part 1: sw_runtime.i -> gnuradio_swig_py_runtime # # We continue to call this gnuradio.i to avoid having to touch # lots of code in other modules @@ -123,8 +125,8 @@ _gnuradio_swig_py_runtime_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED) gnuradio_swig_py_runtime.py gnuradio_swig_py_runtime.h: gnuradio_swig_py_runtime.cc -gnuradio_swig_py_runtime.cc : $(srcdir)/gnuradio.i - if $(SWIG) $(STD_SWIG_PYTHON_ARGS) -MMD -MF gnuradio_swig_py_runtime.Td -module gnuradio_swig_py_runtime -o gnuradio_swig_py_runtime.cc $(srcdir)/gnuradio.i ;\ +gnuradio_swig_py_runtime.cc : $(srcdir)/sw_runtime.i + if $(SWIG) $(STD_SWIG_PYTHON_ARGS) -MMD -MF gnuradio_swig_py_runtime.Td -module gnuradio_swig_py_runtime -o gnuradio_swig_py_runtime.cc $(srcdir)/sw_runtime.i ;\ then if test $(host_os) = mingw32; \ then sed 's,\\\\,/,g' gnuradio_swig_py_runtime.d; rm -f gnuradio_swig_py_runtime.Td; \ else mv -f gnuradio_swig_py_runtime.Td gnuradio_swig_py_runtime.d; fi \ diff --git a/gnuradio-core/src/lib/swig/atsc.i b/gnuradio-core/src/lib/swig/atsc.i deleted file mode 100644 index 67f6ac6b..00000000 --- a/gnuradio-core/src/lib/swig/atsc.i +++ /dev/null @@ -1,136 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -%{ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -%} - -// from atsc_types.h -class plinfo; -class atsc_mpeg_packet; -class atsc_mpeg_packet_no_sync; -class atsc_mpeg_packet_rs_encoded; -class atsc_data_segment; -class atsc_soft_data_segment; - -%include - - -// leave out the VrHistoryProc and pretend we're directly derived from VrSigProc - -// %template(VrHistoryProc_1) VrHistoryProc; - -class GrAtscRandomizer : public VrSigProc -// class GrAtscRandomizer : public VrHistoryProc -{ -public: - GrAtscRandomizer (); - ~GrAtscRandomizer (); -}; - -class GrAtscRSEncoder : public VrSigProc -{ -public: - GrAtscRSEncoder (); - ~GrAtscRSEncoder (); -}; - -class GrAtscInterleaver : public VrSigProc -{ -public: - GrAtscInterleaver (); - ~GrAtscInterleaver (); -}; - -class GrAtscTrellisEncoder : public VrSigProc -{ -public: - GrAtscTrellisEncoder (); - ~GrAtscTrellisEncoder (); -}; - -class GrAtscFieldSyncMux : public VrSigProc -{ -public: - GrAtscFieldSyncMux (); - ~GrAtscFieldSyncMux (); -}; - -template -class GrAtscSymbolMapper : public VrSigProc -{ -public: - GrAtscSymbolMapper (); - ~GrAtscSymbolMapper (); -}; - -%template(GrAtscSymbolMapperF) GrAtscSymbolMapper; - -template -class GrWeaverModHead : public VrSigProc -{ -public: - GrWeaverModHead (int interp_factor); - ~GrWeaverModHead (); -}; - -%template(GrWeaverModHeadFF) GrWeaverModHead; - -template -class GrWeaverModTail : public VrSigProc { -public: - GrWeaverModTail (float freq, float gain); - ~GrWeaverModTail (); - - //! frequency is in Hz - void set_freq (float frequency); - void set_gain (float g); -}; - -%template(GrWeaverModTailFS) GrWeaverModTail; - -class GrAtscConvert2xTo20 : public VrSigProc -{ -public: - GrAtscConvert2xTo20 (); - ~GrAtscConvert2xTo20 (); -}; - - -#if 0 // FIXME -%template(VrSource_mpeg_packet) VrSource; -%template(VrFileSource_mpeg_packet) VrFileSource; - -%template(VrSink_mpeg_packet) VrSink; -%template(VrFileSink_mpeg_packet) VrFileSink; -#endif diff --git a/gnuradio-core/src/lib/swig/gnuradio.i b/gnuradio-core/src/lib/swig/gnuradio.i index aa5174a5..7d0241f1 100644 --- a/gnuradio-core/src/lib/swig/gnuradio.i +++ b/gnuradio-core/src/lib/swig/gnuradio.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2003,2004 Free Software Foundation, Inc. + * Copyright 2003,2004,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -25,23 +25,21 @@ // SWIG interface definition //////////////////////////////////////////////////////////////////////// - -#ifndef SWIGIMPORTED -%module(directors="1") gnuradio_swig_py_runtime -#endif - //////////////////////////////////////////////////////////////////////// // Headers - %{ +#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix #include #include // size_t %} %feature("autodoc","1"); -%include +// local file +%include + +// non-local SWIG files %include %include %include @@ -81,11 +79,9 @@ namespace std { //////////////////////////////////////////////////////////////////////// -%include - // %include - // %include - // %include - -// %include +#ifndef SW_RUNTIME +// import runtime.i for all but sw_runtime, since it needs to %include +%import +#endif //////////////////////////////////////////////////////////////////////// diff --git a/gnuradio-core/src/lib/swig/gr_shared_ptr.i b/gnuradio-core/src/lib/swig/gr_shared_ptr.i new file mode 100644 index 00000000..9663033a --- /dev/null +++ b/gnuradio-core/src/lib/swig/gr_shared_ptr.i @@ -0,0 +1,43 @@ +// +// shared_ptr +// +// An enhanced relative of scoped_ptr with reference counted copy semantics. +// The object pointed to is deleted when the last shared_ptr pointing to it +// is destroyed or reset. +// + +// +// This is highly hacked up version of boost::shared_ptr +// We just need enough to get SWIG to "do the right thing" and +// generate "Smart Pointer" code. +// + +namespace boost { + +template class shared_ptr +{ +public: + + shared_ptr() + { + } + + shared_ptr (T * p) + { + } + + + T * operator-> () // never throws + { + return px; + } + + +private: + + T * px; // contained pointer + int pn; + +}; // shared_ptr + +}; \ No newline at end of file diff --git a/gnuradio-core/src/lib/swig/gr_swig_block_magic.i b/gnuradio-core/src/lib/swig/gr_swig_block_magic.i new file mode 100644 index 00000000..083d6068 --- /dev/null +++ b/gnuradio-core/src/lib/swig/gr_swig_block_magic.i @@ -0,0 +1,45 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +%define GR_SWIG_BLOCK_MAGIC(PKG, BASE_NAME) +_GR_SWIG_BLOCK_MAGIC_HELPER(PKG, PKG ## _ ## BASE_NAME, BASE_NAME) +%enddef + +%define _GR_SWIG_BLOCK_MAGIC_HELPER(PKG, NAME, BASE_NAME) +class NAME; +typedef boost::shared_ptr NAME ## _sptr; +%template(NAME ## _sptr) boost::shared_ptr; +%rename(BASE_NAME) PKG ## _make_ ## BASE_NAME; +%inline { + gr_block_sptr NAME ## _block (NAME ## _sptr r) + { + return gr_block_sptr (r); + } +} + +%pythoncode %{ +NAME ## _sptr.block = lambda self: NAME ## _block (self) +NAME ## _sptr.__repr__ = lambda self: "" % (self.name(), self.unique_id ()) +%} + +%ignore NAME; +%enddef diff --git a/gnuradio-core/src/lib/swig/shared_ptr.i b/gnuradio-core/src/lib/swig/shared_ptr.i deleted file mode 100644 index 9663033a..00000000 --- a/gnuradio-core/src/lib/swig/shared_ptr.i +++ /dev/null @@ -1,43 +0,0 @@ -// -// shared_ptr -// -// An enhanced relative of scoped_ptr with reference counted copy semantics. -// The object pointed to is deleted when the last shared_ptr pointing to it -// is destroyed or reset. -// - -// -// This is highly hacked up version of boost::shared_ptr -// We just need enough to get SWIG to "do the right thing" and -// generate "Smart Pointer" code. -// - -namespace boost { - -template class shared_ptr -{ -public: - - shared_ptr() - { - } - - shared_ptr (T * p) - { - } - - - T * operator-> () // never throws - { - return px; - } - - -private: - - T * px; // contained pointer - int pn; - -}; // shared_ptr - -}; \ No newline at end of file diff --git a/gnuradio-core/src/lib/swig/sw_filter.i b/gnuradio-core/src/lib/swig/sw_filter.i index d28bddd4..6396a97d 100644 --- a/gnuradio-core/src/lib/swig/sw_filter.i +++ b/gnuradio-core/src/lib/swig/sw_filter.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006 Free Software Foundation, Inc. + * Copyright 2006,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -23,13 +23,8 @@ %module(directors="1") gnuradio_swig_py_filter #endif + //%feature("autodoc", "1"); // generate python docstrings -%feature("autodoc", "1"); // generate python docstrings - -%import "gnuradio.i" // the common stuff - -%{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix -%} +%include "gnuradio.i" // the common stuff %include "filter.i" diff --git a/gnuradio-core/src/lib/swig/sw_general.i b/gnuradio-core/src/lib/swig/sw_general.i index 200e6fed..3ab1b056 100644 --- a/gnuradio-core/src/lib/swig/sw_general.i +++ b/gnuradio-core/src/lib/swig/sw_general.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006 Free Software Foundation, Inc. + * Copyright 2006,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -23,13 +23,8 @@ %module(directors="1") gnuradio_swig_py_general #endif + //%feature("autodoc", "1"); // generate python docstrings -%feature("autodoc", "1"); // generate python docstrings - -%import "gnuradio.i" // the common stuff - -%{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix -%} +%include "gnuradio.i" // the common stuff %include "general.i" diff --git a/gnuradio-core/src/lib/swig/sw_gengen.i b/gnuradio-core/src/lib/swig/sw_gengen.i index b885500b..95e85cf6 100644 --- a/gnuradio-core/src/lib/swig/sw_gengen.i +++ b/gnuradio-core/src/lib/swig/sw_gengen.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006 Free Software Foundation, Inc. + * Copyright 2006,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -23,13 +23,8 @@ %module(directors="1") gnuradio_swig_py_gengen #endif + //%feature("autodoc", "1"); // generate python docstrings -%feature("autodoc", "1"); // generate python docstrings - -%import "gnuradio.i" // the common stuff - -%{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix -%} +%include "gnuradio.i" // the common stuff %include "gengen.i" diff --git a/gnuradio-core/src/lib/swig/sw_io.i b/gnuradio-core/src/lib/swig/sw_io.i index acbe1adb..9318f5d8 100644 --- a/gnuradio-core/src/lib/swig/sw_io.i +++ b/gnuradio-core/src/lib/swig/sw_io.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006 Free Software Foundation, Inc. + * Copyright 2006,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -23,13 +23,8 @@ %module(directors="1") gnuradio_swig_py_io #endif + //%feature("autodoc", "1"); // generate python docstrings -%feature("autodoc", "1"); // generate python docstrings - -%import "gnuradio.i" // the common stuff - -%{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix -%} +%include "gnuradio.i" // the common stuff %include "io.i" diff --git a/gnuradio-core/src/lib/swig/sw_runtime.i b/gnuradio-core/src/lib/swig/sw_runtime.i new file mode 100644 index 00000000..8f444f9c --- /dev/null +++ b/gnuradio-core/src/lib/swig/sw_runtime.i @@ -0,0 +1,32 @@ +/* -*- c++ -*- */ +/* + * Copyright 2009 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +#ifndef SWIGIMPORTED +%module(directors="1") gnuradio_swig_py_runtime +#endif + + //%feature("autodoc", "1"); // generate python docstrings + +#define SW_RUNTIME +%include "gnuradio.i" // the common stuff + +%include "runtime.i" diff --git a/gr-atsc/src/lib/atsc.i b/gr-atsc/src/lib/atsc.i index 77f5b75f..e9746551 100644 --- a/gr-atsc/src/lib/atsc.i +++ b/gr-atsc/src/lib/atsc.i @@ -1,13 +1,28 @@ /* -*- c++ -*- */ - -%feature("autodoc", "1"); // generate python docstrings - -%include "exception.i" -%import "gnuradio.i" // the common stuff +/* + * Copyright 2009 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +%include "gnuradio.i" // the common stuff %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix -#include #include #include #include diff --git a/gr-audio-alsa/src/audio_alsa.i b/gr-audio-alsa/src/audio_alsa.i index 1a01cf79..88402333 100644 --- a/gr-audio-alsa/src/audio_alsa.i +++ b/gr-audio-alsa/src/audio_alsa.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2004,2006 Free Software Foundation, Inc. + * Copyright 2004,2006,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,16 +20,11 @@ * Boston, MA 02110-1301, USA. */ -%feature("autodoc","1"); - -%include "exception.i" -%import "gnuradio.i" // the common stuff +%include "gnuradio.i" // the common stuff %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix #include "audio_alsa_sink.h" #include "audio_alsa_source.h" -#include %} // ---------------------------------------------------------------- diff --git a/gr-audio-jack/src/audio_jack.i b/gr-audio-jack/src/audio_jack.i index a5fb606a..62d70d39 100644 --- a/gr-audio-jack/src/audio_jack.i +++ b/gr-audio-jack/src/audio_jack.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2005 Free Software Foundation, Inc. + * Copyright 2005,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,16 +20,11 @@ * Boston, MA 02110-1301, USA. */ -%feature("autodoc","1"); - -%include "exception.i" -%import "gnuradio.i" // the common stuff +%include "gnuradio.i" // the common stuff %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix #include "audio_jack_sink.h" #include "audio_jack_source.h" -#include %} // ---------------------------------------------------------------- diff --git a/gr-audio-oss/src/audio_oss.i b/gr-audio-oss/src/audio_oss.i index a9dec9eb..0a2e6e6a 100644 --- a/gr-audio-oss/src/audio_oss.i +++ b/gr-audio-oss/src/audio_oss.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2004 Free Software Foundation, Inc. + * Copyright 2004,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,16 +20,11 @@ * Boston, MA 02110-1301, USA. */ -%feature("autodoc","1"); - -%include "exception.i" -%import "gnuradio.i" // the common stuff +%include "gnuradio.i" // the common stuff %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix #include "audio_oss_sink.h" #include "audio_oss_source.h" -#include %} // ---------------------------------------------------------------- diff --git a/gr-audio-osx/src/audio_osx.i b/gr-audio-osx/src/audio_osx.i index 77c0ce68..7be48726 100644 --- a/gr-audio-osx/src/audio_osx.i +++ b/gr-audio-osx/src/audio_osx.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006 Free Software Foundation, Inc. + * Copyright 2006,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio. * @@ -20,16 +20,11 @@ * Boston, MA 02110-1301, USA. */ -%feature("autodoc","1"); - -%include "exception.i" -%import "gnuradio.i" // the common stuff +%include "gnuradio.i" // the common stuff %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix #include "audio_osx_sink.h" #include "audio_osx_source.h" -#include %} // ---------------------------------------------------------------- diff --git a/gr-audio-portaudio/src/audio_portaudio.i b/gr-audio-portaudio/src/audio_portaudio.i index ee6a3ae2..b0ec2438 100644 --- a/gr-audio-portaudio/src/audio_portaudio.i +++ b/gr-audio-portaudio/src/audio_portaudio.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2004 Free Software Foundation, Inc. + * Copyright 2004,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,16 +20,11 @@ * Boston, MA 02110-1301, USA. */ -%feature("autodoc","1"); - -%include "exception.i" -%import "gnuradio.i" // the common stuff +%include "gnuradio.i" // the common stuff %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix #include "audio_portaudio_sink.h" #include "audio_portaudio_source.h" -#include %} // ---------------------------------------------------------------- diff --git a/gr-audio-windows/src/audio_windows.i b/gr-audio-windows/src/audio_windows.i index 17ce02b5..b5b6f562 100644 --- a/gr-audio-windows/src/audio_windows.i +++ b/gr-audio-windows/src/audio_windows.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2004 Free Software Foundation, Inc. + * Copyright 2004,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,16 +20,11 @@ * Boston, MA 02110-1301, USA. */ -%feature("autodoc","1"); - -%include "exception.i" -%import "gnuradio.i" // the common stuff +%include "gnuradio.i" // the common stuff %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix #include "audio_windows_sink.h" #include "audio_windows_source.h" -#include %} // ---------------------------------------------------------------- diff --git a/gr-comedi/src/comedi.i b/gr-comedi/src/comedi.i index ac0c0a3e..cdb77aee 100644 --- a/gr-comedi/src/comedi.i +++ b/gr-comedi/src/comedi.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2005 Free Software Foundation, Inc. + * Copyright 2005,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,16 +20,11 @@ * Boston, MA 02110-1301, USA. */ -%feature("autodoc","1"); - -%include "exception.i" -%import "gnuradio.i" // the common stuff +%include "gnuradio.i" // the common stuff %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix #include "comedi_sink_s.h" #include "comedi_source_s.h" -#include %} // ---------------------------------------------------------------- diff --git a/gr-cvsd-vocoder/src/lib/cvsd_vocoder.i b/gr-cvsd-vocoder/src/lib/cvsd_vocoder.i index e8f8309f..bf7a0b59 100644 --- a/gr-cvsd-vocoder/src/lib/cvsd_vocoder.i +++ b/gr-cvsd-vocoder/src/lib/cvsd_vocoder.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2007 Free Software Foundation, Inc. + * Copyright 2007,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,15 +20,11 @@ * Boston, MA 02110-1301, USA. */ -%feature("autodoc","1"); -%include "exception.i" -%import "gnuradio.i" +%include "gnuradio.i" %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix #include "cvsd_encode_sb.h" #include "cvsd_decode_bs.h" -#include %} GR_SWIG_BLOCK_MAGIC(cvsd,encode_sb); diff --git a/gr-gcell/src/gcell.i b/gr-gcell/src/gcell.i index cbe7abcc..29e69fdf 100644 --- a/gr-gcell/src/gcell.i +++ b/gr-gcell/src/gcell.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2008 Free Software Foundation, Inc. + * Copyright 2008,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -19,18 +19,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -%feature("autodoc","1"); - -//%include "exception.i" -%import "gnuradio.i" // the common stuff +%include "gnuradio.i" // the common stuff %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix -//#include - #include -#include - +#include %} %include "gc_job_manager.i" diff --git a/gr-gpio/src/lib/gpio.i b/gr-gpio/src/lib/gpio.i index 8544e913..b65777d3 100644 --- a/gr-gpio/src/lib/gpio.i +++ b/gr-gpio/src/lib/gpio.i @@ -1,14 +1,29 @@ /* -*- c++ -*- */ - -%feature("autodoc", "1"); // generate python docstrings - -%include "exception.i" -%import "gnuradio.i" // the common stuff +/* + * Copyright 2009 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +%include "gnuradio.i" // the common stuff %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix #include "gpio_and_const_ss.h" -#include %} // ---------------------------------------------------------------- diff --git a/gr-gsm-fr-vocoder/src/lib/gsm_full_rate.i b/gr-gsm-fr-vocoder/src/lib/gsm_full_rate.i index 63beb95d..535faa7f 100644 --- a/gr-gsm-fr-vocoder/src/lib/gsm_full_rate.i +++ b/gr-gsm-fr-vocoder/src/lib/gsm_full_rate.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2005 Free Software Foundation, Inc. + * Copyright 2005,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,15 +20,11 @@ * Boston, MA 02110-1301, USA. */ -%feature("autodoc","1"); -%include "exception.i" -%import "gnuradio.i" +%include "gnuradio.i" %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix #include "gsm_fr_encode_sp.h" #include "gsm_fr_decode_ps.h" -#include %} GR_SWIG_BLOCK_MAGIC(gsm_fr,encode_sp); diff --git a/gr-howto-write-a-block/src/lib/howto.i b/gr-howto-write-a-block/src/lib/howto.i index 3d46ab47..c3dae9df 100644 --- a/gr-howto-write-a-block/src/lib/howto.i +++ b/gr-howto-write-a-block/src/lib/howto.i @@ -1,15 +1,10 @@ /* -*- c++ -*- */ -%feature("autodoc", "1"); // generate python docstrings - -%include "exception.i" -%import "gnuradio.i" // the common stuff +%include "gnuradio.i" // the common stuff %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix #include "howto_square_ff.h" #include "howto_square2_ff.h" -#include %} // ---------------------------------------------------------------- diff --git a/gr-msdd6000/src/msdd.i b/gr-msdd6000/src/msdd.i index 5046bb19..d122d474 100644 --- a/gr-msdd6000/src/msdd.i +++ b/gr-msdd6000/src/msdd.i @@ -20,12 +20,9 @@ * Boston, MA 02110-1301, USA. */ -%feature("autodoc", "1"); // generate python docstrings - -%import "gnuradio.i" // the common stuff +%include "gnuradio.i" // the common stuff %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix #include "msdd_source_s.h" #include "msdd_source_c.h" #include "msdd_source_simple.h" diff --git a/gr-pager/src/pager.i b/gr-pager/src/pager.i index e6530be5..aeb576db 100644 --- a/gr-pager/src/pager.i +++ b/gr-pager/src/pager.i @@ -1,5 +1,5 @@ /* - * Copyright 2005,2006 Free Software Foundation, Inc. + * Copyright 2005,2006,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -19,18 +19,14 @@ * Boston, MA 02110-1301, USA. */ -%feature("autodoc","1"); -%include "exception.i" -%import "gnuradio.i" +%include "gnuradio.i" %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix #include "pager_flex_frame.h" #include "pager_slicer_fb.h" #include "pager_flex_sync.h" #include "pager_flex_deinterleave.h" #include "pager_flex_parse.h" -#include %} %include "pager_flex_frame.i" diff --git a/gr-qtgui/src/lib/qtgui.i b/gr-qtgui/src/lib/qtgui.i index 52156054..129e9269 100644 --- a/gr-qtgui/src/lib/qtgui.i +++ b/gr-qtgui/src/lib/qtgui.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2008 Free Software Foundation, Inc. + * Copyright 2008,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,15 +20,11 @@ * Boston, MA 02110-1301, USA. */ -%feature("autodoc","1"); -%include "exception.i" -%import "gnuradio.i" +%include "gnuradio.i" %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix #include "qtgui_sink_c.h" #include "qtgui_sink_f.h" -#include %} GR_SWIG_BLOCK_MAGIC(qtgui,sink_c) diff --git a/gr-radio-astronomy/src/lib/ra.i b/gr-radio-astronomy/src/lib/ra.i index 15cfbfb3..e258b876 100644 --- a/gr-radio-astronomy/src/lib/ra.i +++ b/gr-radio-astronomy/src/lib/ra.i @@ -1,14 +1,26 @@ /* -*- c++ -*- */ +/* + * Copyright 2009 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ -%feature("autodoc", "1"); // generate python docstrings - -%include "exception.i" -%import "gnuradio.i" // the common stuff - -%{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix -#include -%} +%include "gnuradio.i" // the common stuff // We'll need something like this if we add C++ blocks... // See the gr-howto-write-a-block tarball for examples diff --git a/gr-trellis/src/lib/trellis.i b/gr-trellis/src/lib/trellis.i index 6f00f8c3..ed1fe29c 100644 --- a/gr-trellis/src/lib/trellis.i +++ b/gr-trellis/src/lib/trellis.i @@ -1,18 +1,33 @@ /* -*- c++ -*- */ - -%feature("autodoc", "1"); // generate python docstrings - -%include "exception.i" -%import "gnuradio.i" // the common stuff +/* + * Copyright 2009 Free Software Foundation, Inc. + * + * This file is part of GNU Radio + * + * GNU Radio is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3, or (at your option) + * any later version. + * + * GNU Radio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Radio; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, + * Boston, MA 02110-1301, USA. + */ + +%include "gnuradio.i" // the common stuff %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix #include "fsm.h" #include "interleaver.h" #include "trellis_permutation.h" #include "trellis_siso_f.h" #include "trellis_siso_combined_f.h" -#include %} // ---------------------------------------------------------------- diff --git a/gr-usrp/src/usrp.i b/gr-usrp/src/usrp.i index 07dcb419..55ad2a76 100644 --- a/gr-usrp/src/usrp.i +++ b/gr-usrp/src/usrp.i @@ -20,12 +20,9 @@ * Boston, MA 02110-1301, USA. */ -%feature("autodoc", "1"); // generate python docstrings - -%import "gnuradio.i" // the common stuff +%include "gnuradio.i" // the common stuff %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix #include %} diff --git a/gr-usrp2/src/usrp2.i b/gr-usrp2/src/usrp2.i index c9a4af59..f49a0caf 100644 --- a/gr-usrp2/src/usrp2.i +++ b/gr-usrp2/src/usrp2.i @@ -20,13 +20,10 @@ * Boston, MA 02110-1301, USA. */ -%feature("autodoc", "1"); // generate python docstrings - -%import "gnuradio.i" // the common stuff -%import +%include "gnuradio.i" // the common stuff +%import %{ -#include #include "usrp2_source_16sc.h" #include "usrp2_source_32fc.h" #include "usrp2_sink_16sc.h" diff --git a/gr-video-sdl/src/video_sdl.i b/gr-video-sdl/src/video_sdl.i index 9cfa1589..7084c209 100644 --- a/gr-video-sdl/src/video_sdl.i +++ b/gr-video-sdl/src/video_sdl.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006 Free Software Foundation, Inc. + * Copyright 2006,2009 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,16 +20,11 @@ * Boston, MA 02110-1301, USA. */ -%feature("autodoc","1"); - -%include "exception.i" -%import "gnuradio.i" // the common stuff +%include "gnuradio.i" // the common stuff %{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix #include "video_sdl_sink_uc.h" #include "video_sdl_sink_s.h" -#include %} // ---------------------------------------------------------------- diff --git a/usrp/host/lib/legacy/db_base.i b/usrp/host/lib/legacy/db_base.i index 3e567637..bd5483aa 100644 --- a/usrp/host/lib/legacy/db_base.i +++ b/usrp/host/lib/legacy/db_base.i @@ -1,12 +1,12 @@ /* -*- c++ -*- */ // -// Copyright 2008 Free Software Foundation, Inc. +// Copyright 2008,2009 Free Software Foundation, Inc. // // This file is part of GNU Radio // // GNU Radio is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either asversion 3, or (at your option) +// the Free Software Foundation; either version 3, or (at your option) // any later version. // // GNU Radio is distributed in the hope that it will be useful, @@ -25,7 +25,7 @@ #include "db_base.h" %} -%include +%include class usrp_tune_result {