mirror of https://github.com/arendst/Tasmota.git
59 lines
2.4 KiB
C
59 lines
2.4 KiB
C
/********************************************************************
|
|
* Berry python compatibility module
|
|
*
|
|
* `import python_compat`
|
|
*******************************************************************/
|
|
#include "be_constobj.h"
|
|
|
|
/********************************************************************
|
|
** Solidified function: _anonymous_
|
|
********************************************************************/
|
|
be_local_closure(_anonymous_, /* name */
|
|
be_nested_proto(
|
|
3, /* nstack */
|
|
1, /* argc */
|
|
0, /* varg */
|
|
0, /* has upvals */
|
|
NULL, /* no upvals */
|
|
0, /* has sup protos */
|
|
NULL, /* no sub protos */
|
|
1, /* has constants */
|
|
( &(const bvalue[ 5]) { /* constants */
|
|
/* K0 */ be_nested_string("global", 503252654, 6),
|
|
/* K1 */ be_nested_string("True", -841064955, 4),
|
|
/* K2 */ be_nested_string("False", -1753917960, 5),
|
|
/* K3 */ be_nested_string("None", 810547195, 4),
|
|
/* K4 */ be_nested_string("b", -418632219, 1),
|
|
}),
|
|
(be_nested_const_str("_anonymous_", 1957281476, 11)),
|
|
(be_nested_const_str("python_compat.be", -225667571, 16)),
|
|
( &(const binstruction[10]) { /* code */
|
|
0xA4060000, // 0000 IMPORT R1 K0
|
|
0x50080200, // 0001 LDBOOL R2 1 0
|
|
0x90060202, // 0002 SETMBR R1 K1 R2
|
|
0x50080000, // 0003 LDBOOL R2 0 0
|
|
0x90060402, // 0004 SETMBR R1 K2 R2
|
|
0x4C080000, // 0005 LDNIL R2
|
|
0x90060602, // 0006 SETMBR R1 K3 R2
|
|
0x60080015, // 0007 GETGBL R2 G21
|
|
0x90060802, // 0008 SETMBR R1 K4 R2
|
|
0x80040000, // 0009 RET 1 R0
|
|
})
|
|
)
|
|
);
|
|
/*******************************************************************/
|
|
|
|
|
|
/********************************************************************
|
|
** Solidified module: python_compat
|
|
********************************************************************/
|
|
be_local_module(python_compat,
|
|
"python_compat",
|
|
be_nested_map(1,
|
|
( (struct bmapnode*) &(const bmapnode[]) {
|
|
{ be_nested_key("init", 380752755, 4, -1), be_const_closure(_anonymous__closure) },
|
|
}))
|
|
);
|
|
BE_EXPORT_VARIABLE be_define_const_native_module(python_compat, NULL);
|
|
/********************************************************************/
|