The cloned code doesn't compile with Python 3.8. due to the addition of *getuser... operator on gen_mpy.py. I have changed this to be compatible with previous versions of Python. Please commit this! Thanks a lot !
gen_mpy.patch
diff --git a/gen/gen_mpy.py b/gen/gen_mpy.py
index 23749b7..0b8437e 100644
--- a/gen/gen_mpy.py
+++ b/gen/gen_mpy.py
@@ -1847,8 +1847,6 @@ def get_user_data(func, func_name = None, containing_struct = None, containing_s
if not func_name: func_name = get_arg_name(func.type)
setter = None
user_data = 'None'
if len(args) > 0 and isinstance(args[0].type, c_ast.PtrDecl):
if isinstance(args[0].type.type.type, c_ast.Struct):
@@ -1881,15 +1879,7 @@ def get_user_data(func, func_name = None, containing_struct = None, containing_s
containing_struct_j = next((struct for struct in lvgl_json["structures"] if struct["name"] == struct_arg_type_name_with_underscore), None)
if containing_struct_j is not None:
user_data_found = any(user_data == field["name"] for field in containing_struct_j["fields"])
The cloned code doesn't compile with Python 3.8. due to the addition of *getuser... operator on gen_mpy.py. I have changed this to be compatible with previous versions of Python. Please commit this! Thanks a lot ! gen_mpy.patch
diff --git a/gen/gen_mpy.py b/gen/gen_mpy.py index 23749b7..0b8437e 100644 --- a/gen/gen_mpy.py +++ b/gen/gen_mpy.py @@ -1847,8 +1847,6 @@ def get_user_data(func, func_name = None, containing_struct = None, containing_s if not func_name: func_name = get_arg_name(func.type)
print('/ --> callback: func_name = %s, args = %s /' % (func_name, repr(args)))
if isinstance(args[0].type.type.type, c_ast.Struct):
@@ -1881,15 +1879,7 @@ def get_user_data(func, func_name = None, containing_struct = None, containing_s containing_struct_j = next((struct for struct in lvgl_json["structures"] if struct["name"] == struct_arg_type_name_with_underscore), None) if containing_struct_j is not None: user_data_found = any(user_data == field["name"] for field in containing_struct_j["fields"])
Ensure that getter and setter are initialized
Ensure that getter and setter are initialized