From 1c625befa34339902361783383da2a510789398c Mon Sep 17 00:00:00 2001 From: George Marques Date: Sat, 28 Jan 2023 14:01:27 -0300 Subject: [PATCH] Support typed array default values in extension API The API JSON has changed syntax for default values of typed arrays. This detects the new format and use initializer lists (currently empty since the TypedArray class does not support initializer list construction and default values are always empty arrays). --- binding_generator.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/binding_generator.py b/binding_generator.py index 9919b735..6ce4379f 100644 --- a/binding_generator.py +++ b/binding_generator.py @@ -2129,6 +2129,8 @@ def correct_default_value(value, type_name): return value_map[value] if value == "": return f"{type_name}()" + if value.startswith("Array["): + return f"{{}}" return value