mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
Update cJSONw.cpp
This commit is contained in:
parent
4ba454f7a3
commit
1417dc37df
@ -93,11 +93,6 @@ static PyVar convert_cjson_to_python_object(const cJSON * const item, VM* vm)
|
|||||||
void add_module_cjson(VM* vm){
|
void add_module_cjson(VM* vm){
|
||||||
PyVar mod = vm->new_module("cjson");
|
PyVar mod = vm->new_module("cjson");
|
||||||
|
|
||||||
PK_LOCAL_STATIC cJSON_Hooks hooks;
|
|
||||||
hooks.malloc_fn = pool64_alloc;
|
|
||||||
hooks.free_fn = pool64_dealloc;
|
|
||||||
cJSON_InitHooks(&hooks);
|
|
||||||
|
|
||||||
vm->bind_func(mod, "loads", 1, [](VM* vm, ArgsView args){
|
vm->bind_func(mod, "loads", 1, [](VM* vm, ArgsView args){
|
||||||
std::string_view sv;
|
std::string_view sv;
|
||||||
if(is_type(args[0], vm->tp_bytes)){
|
if(is_type(args[0], vm->tp_bytes)){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user