diff options
Diffstat (limited to 'gr-utils/src/python/modtool')
-rw-r--r-- | gr-utils/src/python/modtool/modtool_add.py | 2 | ||||
-rw-r--r-- | gr-utils/src/python/modtool/templates.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gr-utils/src/python/modtool/modtool_add.py b/gr-utils/src/python/modtool/modtool_add.py index 7ca375b6f..e1d61cf0f 100644 --- a/gr-utils/src/python/modtool/modtool_add.py +++ b/gr-utils/src/python/modtool/modtool_add.py @@ -246,6 +246,7 @@ class ModToolAdd(ModTool): if self._info['version'] == '36': mod_block_sep = '_' swig_block_magic_str = get_template('swig_block_magic', **self._info) + open(self._file['swig'], 'a').write(swig_block_magic_str) include_str = '#include "%s%s%s.h"' % ( self._info['modname'], mod_block_sep, @@ -257,7 +258,6 @@ class ModToolAdd(ModTool): regexp = re.compile('^%\{\n', re.MULTILINE) oldfile = regexp.sub('%%{\n%s\n' % include_str, oldfile, count=1) open(self._file['swig'], 'w').write(oldfile) - open(self._file['swig'], 'a').write(swig_block_magic_str) def _run_python_qa(self): """ Do everything that needs doing in the subdir 'python' to add diff --git a/gr-utils/src/python/modtool/templates.py b/gr-utils/src/python/modtool/templates.py index 877735711..f405bcabb 100644 --- a/gr-utils/src/python/modtool/templates.py +++ b/gr-utils/src/python/modtool/templates.py @@ -502,8 +502,8 @@ Templates['swig_block_magic'] = """#if $version == '37' #set $mod_block_sep = '_' #set $block_magic_version = '' #end if -%include "${modname}${mod_block_sep}${blockname}.h" GR_SWIG_BLOCK_MAGIC${block_magic_version}($modname, $blockname); +%include "${modname}${mod_block_sep}${blockname}.h" """ ## Old stuff |