mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00

With the introduction of SPDX-License-Identifier headers, we don't need a ton of header boilerplate in every file. Simplify the files and rely on the top level for the full licence text. (Bitbake rev: 695d84397b68cc003186e22f395caa378b06bc75) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
31 lines
744 B
Python
31 lines
744 B
Python
# ex:ts=4:sw=4:sts=4:et
|
|
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
|
#
|
|
#
|
|
# Copyright (C) 2006 Holger Hans Peter Freyther
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
|
|
from bb.utils import better_compile, better_exec
|
|
|
|
def insert_method(modulename, code, fn, lineno):
|
|
"""
|
|
Add code of a module should be added. The methods
|
|
will be simply added, no checking will be done
|
|
"""
|
|
comp = better_compile(code, modulename, fn, lineno=lineno)
|
|
better_exec(comp, None, code, fn)
|
|
|
|
compilecache = {}
|
|
|
|
def compile_cache(code):
|
|
h = hash(code)
|
|
if h in compilecache:
|
|
return compilecache[h]
|
|
return None
|
|
|
|
def compile_cache_add(code, compileobj):
|
|
h = hash(code)
|
|
compilecache[h] = compileobj
|