diff options
| author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 14:36:22 +0200 |
|---|---|---|
| committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 15:32:53 +0200 |
| commit | f4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch) | |
| tree | 487180fa9866985ea7b28e625651765d86f515c3 /bitbake/lib/bb/methodpool.py | |
| download | poky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz | |
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'bitbake/lib/bb/methodpool.py')
| -rw-r--r-- | bitbake/lib/bb/methodpool.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/bitbake/lib/bb/methodpool.py b/bitbake/lib/bb/methodpool.py new file mode 100644 index 0000000000..bf2e9f5542 --- /dev/null +++ b/bitbake/lib/bb/methodpool.py | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | # ex:ts=4:sw=4:sts=4:et | ||
| 2 | # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
| 3 | # | ||
| 4 | # | ||
| 5 | # Copyright (C) 2006 Holger Hans Peter Freyther | ||
| 6 | # | ||
| 7 | # This program is free software; you can redistribute it and/or modify | ||
| 8 | # it under the terms of the GNU General Public License version 2 as | ||
| 9 | # published by the Free Software Foundation. | ||
| 10 | # | ||
| 11 | # This program is distributed in the hope that it will be useful, | ||
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | # GNU General Public License for more details. | ||
| 15 | # | ||
| 16 | # You should have received a copy of the GNU General Public License along | ||
| 17 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
| 18 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 19 | |||
| 20 | from bb.utils import better_compile, better_exec | ||
| 21 | |||
| 22 | def insert_method(modulename, code, fn): | ||
| 23 | """ | ||
| 24 | Add code of a module should be added. The methods | ||
| 25 | will be simply added, no checking will be done | ||
| 26 | """ | ||
| 27 | comp = better_compile(code, modulename, fn ) | ||
| 28 | better_exec(comp, None, code, fn) | ||
| 29 | |||
