diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2013-03-26 20:18:53 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2013-03-26 20:18:53 -0700 |
commit | 26dceecc80390f10cedb94bd9e4fd655827d7f17 (patch) | |
tree | f88cb2995133048b4a2191bae688fa09b33a19ae /gnuradio-core/src/lib/swig | |
parent | 9bbbda510c265b211b5b571db79ba259c67ee049 (diff) |
runtime: migrate remaining gnuradio-core contents into gnuradio-runtime
Diffstat (limited to 'gnuradio-core/src/lib/swig')
-rw-r--r-- | gnuradio-core/src/lib/swig/CMakeLists.txt | 105 | ||||
-rwxr-xr-x | gnuradio-core/src/lib/swig/gen-swig-bug-fix | 111 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gnuradio.i | 90 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gnuradio_core.py | 24 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gnuradio_core_general.i | 54 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gnuradio_core_hier.i | 32 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gnuradio_core_runtime.i | 34 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gnuradio_swig_bug_workaround.h | 46 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gr_shared_ptr.i | 43 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gr_swig_block_magic.i | 58 |
10 files changed, 0 insertions, 597 deletions
diff --git a/gnuradio-core/src/lib/swig/CMakeLists.txt b/gnuradio-core/src/lib/swig/CMakeLists.txt deleted file mode 100644 index f098597df0..0000000000 --- a/gnuradio-core/src/lib/swig/CMakeLists.txt +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright 2010-2011 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(GrPython) -include(GrSwig) - -set(GR_SWIG_INCLUDE_DIRS - ${CMAKE_CURRENT_BINARY_DIR} - ${GNURADIO_CORE_SWIG_INCLUDE_DIRS} - ${GRUEL_INCLUDE_DIRS} - ${LOG4CPP_INCLUDE_DIRS} - ${Boost_INCLUDE_DIRS} -) -set(GR_SWIG_LIBRARIES - gnuradio-core - ${LOG4CPP_LIBRARIES} -) - -# Only use if log4cpp is installed -# Define ENABLE_GR_LOG for the .i file to ignore it. -if(ENABLE_GR_LOG) - SET(GR_SWIG_FLAGS "-DENABLE_GR_LOG") -endif(ENABLE_GR_LOG) - -if(ENABLE_GR_CTRLPORT) - list(APPEND GR_SWIG_FLAGS -DGR_CTRLPORT) - list(APPEND GR_SWIG_LIBRARIES ${ICE_LIBRARIES}) - list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR}) -endif(ENABLE_GR_CTRLPORT) - -link_directories(${Boost_LIBRARY_DIRS}) - -######################################################################## -# Build and install the swig targets -######################################################################## -# ---------------------------------------------------------------- -# We've split the previously monstrous gnuradio_corethon into 6 -# smaller pieces. This reduces compile time coupling and creates -# smaller pieces for the compiler to digest. prior to this change, on -# X86_64, g++'s resident set size was 650MB! -# ---------------------------------------------------------------- - -set(GR_SWIG_TARGET_DEPS gnuradio_core_generated_sources - general_generated filter_generated pmt_swig) - -foreach(what runtime general) - SET(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/${what}_swig_doc.i) - SET(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../${what} ${CMAKE_CURRENT_BINARY_DIR}/../${what}) - GR_SWIG_MAKE(gnuradio_core_${what} gnuradio_core_${what}.i) - GR_SWIG_INSTALL( - TARGETS gnuradio_core_${what} - DESTINATION ${GR_PYTHON_DIR}/gnuradio/gr - COMPONENT "core_python" - ) - install( - FILES - gnuradio_core_${what}.i - ${CMAKE_CURRENT_BINARY_DIR}/${what}_swig_doc.i - DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig - COMPONENT "core_swig" - ) - list(APPEND core_swig_deps ${SWIG_MODULE_gnuradio_core_${what}_REAL_NAME}) -endforeach(what) - -add_custom_target(core_swig DEPENDS ${core_swig_deps}) - -######################################################################## -# Install various files -######################################################################## -install(FILES - gnuradio.i - gr_swig_block_magic.i - gr_shared_ptr.i - DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig - COMPONENT "core_swig" -) - -GR_PYTHON_INSTALL( - FILES gnuradio_core.py - DESTINATION ${GR_PYTHON_DIR}/gnuradio/gr - COMPONENT "core_python" -) - -install( - FILES ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio_swig_bug_workaround.h - DESTINATION ${GR_INCLUDE_DIR}/gnuradio - COMPONENT "core_swig" -) diff --git a/gnuradio-core/src/lib/swig/gen-swig-bug-fix b/gnuradio-core/src/lib/swig/gen-swig-bug-fix deleted file mode 100755 index 5e9f82e7d7..0000000000 --- a/gnuradio-core/src/lib/swig/gen-swig-bug-fix +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env python -# -# 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. -# - -import sys -import re - -def write_header (f): - f.write ('''/* -*- 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. - */ - -#ifndef INCLUDED_GNURADIO_SWIG_BUG_WORKAROUND_H -#define INCLUDED_GNURADIO_SWIG_BUG_WORKAROUND_H - -/* - * This include files works around a bug in SWIG 1.3.21 and 22 - * where it fails to emit these declarations when doing - * %import "gnuradio.i" - */ - -''') - -def write_trailer (f): - f.write (''' -#endif /* INCLUDED_GNURADIO_SWIG_BUG_WORKAROUND_H */ -''') - -def doit (input, output): - re_RULES_BEGIN = re.compile ('RULES \(BEGIN\)') - re_RULES_END = re.compile ('RULES \(END\)') - re_RETURN = re.compile ('^\s*return') - re_NOT_ID = re.compile ('[^a-zA-Z0-9_]') - words = {} - - write_header (output) - for line in input: - if re_RULES_BEGIN.search (line): - break - - for line in input: - if re_RULES_END.search (line): - break - if not re_RETURN.match (line): - continue - line = re_NOT_ID.sub (' ', line) - line = re.sub (' +', ' ', line) - for w in line.split (' '): - words[w] = 1 - - for w in ('', 'return', 'void', 'x'): - del words[w] - - wl = words.keys() - wl.sort () - for w in wl: - output.write ('class ' + w + ';\n') - - write_trailer (output) - - -def main (): - if len (sys.argv) != 3: - sys.stderr.write ("usage: %s gnuradio_swig_python.cc gnuradio_swig_bug_workaround.h\n" - % (sys.argv[0],)) - sys.exit (1) - input_filename = sys.argv[1] - output_filename = sys.argv[2] - input = open (input_filename, "r") - output = open (output_filename, "w") - doit (input, output) - -if __name__ == '__main__': - main () - diff --git a/gnuradio-core/src/lib/swig/gnuradio.i b/gnuradio-core/src/lib/swig/gnuradio.i deleted file mode 100644 index 03b7817e22..0000000000 --- a/gnuradio-core/src/lib/swig/gnuradio.i +++ /dev/null @@ -1,90 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003,2004,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. - */ - -// Disable warning about base class types -#pragma SWIG nowarn=401 - -//////////////////////////////////////////////////////////////////////// -// gnuradio.i -// SWIG interface definition -//////////////////////////////////////////////////////////////////////// - -%include <gruel_common.i> - -//////////////////////////////////////////////////////////////////////// -// Headers - -%{ -#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix -#include <gr_types.h> -#include <stddef.h> // size_t -#include <complex> -#include <string.h> -%} - -%feature("autodoc","1"); - -// local file -%include <gr_shared_ptr.i> -%include <gr_types.h> -%include <std_complex.i> -%include <std_vector.i> -%include <stl.i> -%include <std_except.i> -%include <std_string.i> - -typedef std::complex<float> gr_complex; -typedef std::complex<double> gr_complexd; -typedef unsigned long long uint64_t; -typedef long long int64_t; - - -// instantiate the required template specializations - -namespace std { - %template() vector<unsigned char>; - %template() vector<char>; - %template() vector<short>; - %template() vector<int>; - %template() vector<float>; - %template() vector<double>; - %template() vector<std::string>; - %template() vector<gr_tag_t>; - - %template() vector< std::complex<float> >; - %template() vector< std::vector< unsigned char > >; - %template() vector< std::vector< char > >; - %template() vector< std::vector< short > >; - %template() vector< std::vector< int > >; - %template() vector< std::vector< float > >; - %template() vector< std::vector< double > >; - %template() vector< std::vector< std::complex<float> > >; -}; - -//////////////////////////////////////////////////////////////////////// - -#ifndef SW_RUNTIME -// import runtime.i for all but sw_runtime, since it needs to %include -%import <runtime.i> -#endif - -//////////////////////////////////////////////////////////////////////// diff --git a/gnuradio-core/src/lib/swig/gnuradio_core.py b/gnuradio-core/src/lib/swig/gnuradio_core.py deleted file mode 100644 index 09d00fcdc1..0000000000 --- a/gnuradio-core/src/lib/swig/gnuradio_core.py +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright 2006,2009,2010 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 this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -# This file implements the old gnuradio_core namespace - -from gnuradio_core_runtime import * -from gnuradio_core_general import * diff --git a/gnuradio-core/src/lib/swig/gnuradio_core_general.i b/gnuradio-core/src/lib/swig/gnuradio_core_general.i deleted file mode 100644 index 33f97815e8..0000000000 --- a/gnuradio-core/src/lib/swig/gnuradio_core_general.i +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006,2009,2010 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 this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -%include "general_swig_doc.i" - -#define GR_CORE_API - -#ifndef SWIGIMPORTED -%module(directors="1") gnuradio_core_general -#endif - - //%feature("autodoc", "1"); // generate python docstrings - -%include "gnuradio.i" // the common stuff - -%include "general.i" - - // Simple test case for complex input and output -%inline -%{ - std::complex<float> complexf_add_2j(std::complex<float> x) - { - return std::complex<float>(x.real(), x.imag() + 2); - } - - std::complex<double> complexd_add_2j(std::complex<double> x) - { - return std::complex<double>(x.real(), x.imag() + 2); - } - - std::complex<float> complexf_add_x_2j(float x, std::complex<float> y) - { - return std::complex<float>(x + y.real(), y.imag() + 2); - } - -%} diff --git a/gnuradio-core/src/lib/swig/gnuradio_core_hier.i b/gnuradio-core/src/lib/swig/gnuradio_core_hier.i deleted file mode 100644 index 141d9b1635..0000000000 --- a/gnuradio-core/src/lib/swig/gnuradio_core_hier.i +++ /dev/null @@ -1,32 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2009,2010 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 this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -%include "hier_swig_doc.i" - -#ifndef SWIGIMPORTED -%module(directors="1") gnuradio_hier_hier -#endif - - //%feature("autodoc", "1"); // generate python docstrings - -%include "gnuradio.i" // the common stuff - -%include "hier.i" diff --git a/gnuradio-core/src/lib/swig/gnuradio_core_runtime.i b/gnuradio-core/src/lib/swig/gnuradio_core_runtime.i deleted file mode 100644 index fb311d226d..0000000000 --- a/gnuradio-core/src/lib/swig/gnuradio_core_runtime.i +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2009,2010 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 "runtime_swig_doc.i" - -#ifndef SWIGIMPORTED -%module(directors="1") gnuradio_core_runtime -#endif - - //%feature("autodoc", "1"); // generate python docstrings - -#define SW_RUNTIME -%include "gnuradio.i" // the common stuff - -%include "runtime.i" diff --git a/gnuradio-core/src/lib/swig/gnuradio_swig_bug_workaround.h b/gnuradio-core/src/lib/swig/gnuradio_swig_bug_workaround.h deleted file mode 100644 index bbbabaf07b..0000000000 --- a/gnuradio-core/src/lib/swig/gnuradio_swig_bug_workaround.h +++ /dev/null @@ -1,46 +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. - */ - -#ifndef INCLUDED_GNURADIO_SWIG_BUG_WORKAROUND_H -#define INCLUDED_GNURADIO_SWIG_BUG_WORKAROUND_H - -/* - * This include files works around a bug in SWIG 1.3.21 and 22 - * where it fails to emit these declarations when doing - * %import "gnuradio.i" - */ - -class gr_base_error_handler; -class gr_basic_block; -class gr_block; -class gr_error_handler; -class gr_file_error_handler; -class gr_hier_block2; -class gr_msg_handler; -class gr_msg_queue; -class gr_sync_block; -class gr_sync_decimator; -class gr_sync_interpolator; -class gr_tagged_stream_block; -class gr_top_block; - -#endif /* INCLUDED_GNURADIO_SWIG_BUG_WORKAROUND_H */ diff --git a/gnuradio-core/src/lib/swig/gr_shared_ptr.i b/gnuradio-core/src/lib/swig/gr_shared_ptr.i deleted file mode 100644 index 323d33ad73..0000000000 --- a/gnuradio-core/src/lib/swig/gr_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 T> 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 deleted file mode 100644 index 6d1af6136d..0000000000 --- a/gnuradio-core/src/lib/swig/gr_swig_block_magic.i +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2010,2012 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, BASE_NAME, PKG ## _ ## BASE_NAME) -%enddef - -%define _GR_SWIG_BLOCK_MAGIC_HELPER_COMMON(PKG, BASE_NAME, FULL_NAME) -class FULL_NAME; -typedef boost::shared_ptr<FULL_NAME> FULL_NAME ## _sptr; -%template(FULL_NAME ## _sptr) boost::shared_ptr<FULL_NAME>; -%rename(BASE_NAME) PKG ## _make_ ## BASE_NAME; -%ignore FULL_NAME; -%enddef - -#ifdef SWIGPYTHON -%define _GR_SWIG_BLOCK_MAGIC_HELPER(PKG, BASE_NAME, FULL_NAME) -_GR_SWIG_BLOCK_MAGIC_HELPER_COMMON(PKG, BASE_NAME, FULL_NAME) -%pythoncode %{ -FULL_NAME ## _sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), self.unique_id ()) -%} -%enddef -#endif - -%define GR_SWIG_BLOCK_MAGIC2(PKG, BASE_NAME) -%template(BASE_NAME ## _sptr) boost::shared_ptr<gr:: ## PKG ## :: ## BASE_NAME>; -%pythoncode %{ -BASE_NAME ## _sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), self.unique_id()) -BASE_NAME = BASE_NAME.make; -%} -%enddef - -%define GR_SWIG_BLOCK_MAGIC_FACTORY(PKG, BASE_NAME, FACTORY) -%template(FACTORY ## _sptr) boost::shared_ptr<gr:: ## PKG ## :: ## BASE_NAME>; -%pythoncode %{ -FACTORY ## _sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), self.unique_id()) -FACTORY = BASE_NAME ## _make_ ## FACTORY; -%} -%enddef |