diff options
Diffstat (limited to 'bitbake/lib/bb/methodpool.py')
| -rw-r--r-- | bitbake/lib/bb/methodpool.py | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/bitbake/lib/bb/methodpool.py b/bitbake/lib/bb/methodpool.py deleted file mode 100644 index 51783acc1b..0000000000 --- a/bitbake/lib/bb/methodpool.py +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | # | ||
| 2 | # Copyright (C) 2006 Holger Hans Peter Freyther | ||
| 3 | # | ||
| 4 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 5 | # | ||
| 6 | |||
| 7 | from bb.utils import better_compile, better_exec | ||
| 8 | |||
| 9 | def insert_method(modulename, code, fn, lineno): | ||
| 10 | """ | ||
| 11 | Add code of a module should be added. The methods | ||
| 12 | will be simply added, no checking will be done | ||
| 13 | """ | ||
| 14 | comp = better_compile(code, modulename, fn, lineno=lineno) | ||
| 15 | better_exec(comp, None, code, fn) | ||
| 16 | |||
| 17 | compilecache = {} | ||
| 18 | |||
| 19 | def compile_cache(code): | ||
| 20 | h = hash(code) | ||
| 21 | if h in compilecache: | ||
| 22 | return compilecache[h] | ||
| 23 | return None | ||
| 24 | |||
| 25 | def compile_cache_add(code, compileobj): | ||
| 26 | h = hash(code) | ||
| 27 | compilecache[h] = compileobj | ||
