From 2ba9f1a544be17f40d60ba365bb084a342d41e0a Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 4 Feb 2013 15:34:41 +0100 Subject: modtool: bugfix, BLOCK_MAGIC should appear before %include --- gr-utils/src/python/modtool/modtool_add.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-utils/src/python/modtool/modtool_add.py') 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 -- cgit