summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/methodpool.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/methodpool.py')
-rw-r--r--bitbake/lib/bb/methodpool.py29
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
20from bb.utils import better_compile, better_exec
21
22def 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