diff options
| author | Radek Micek <radek.micek@gmail.com> | 2025-03-31 09:30:23 +0200 |
|---|---|---|
| committer | Radek Micek <radek.micek@gmail.com> | 2025-06-13 23:02:50 +0200 |
| commit | 8c4db4332211025ffce87d6196e8d32b83310091 (patch) | |
| tree | 1904e6a19b3ac957bbddfc4217824e8cf2c25844 /bindgen/gen_c3.py | |
| parent | 55af0a43deff7e9907ffeb5112b5c6ed1480bfb7 (diff) | |
Update C3 language to version 0.7.2
Diffstat (limited to 'bindgen/gen_c3.py')
| -rw-r--r-- | bindgen/gen_c3.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bindgen/gen_c3.py b/bindgen/gen_c3.py index 39323edb..91112778 100644 --- a/bindgen/gen_c3.py +++ b/bindgen/gen_c3.py @@ -111,7 +111,7 @@ aliases = { ("DataCb", "fn void(void*)"), "void *(*)(size_t, void *)": ("AllocCb", "fn void*(usz, void*)"), - "void (*)(void *, void *)": + "void (*)(void *, void *)": ("FreeCb", "fn void*(usz, void*)"), "void (*)(const char *, uint32_t, uint32_t, const char *, uint32_t, const char *, void *)": ("LogCb", "fn void(ZString, uint, uint, ZString, uint, ZString, void*)"), @@ -361,7 +361,7 @@ def gen_enum(decl, prefix): tpe = "int" if any(as_enum_item_name(check_override(item['name'])) == 'FORCE_U32' for item in decl['items']): tpe = "uint" - l(f'distinct {as_struct_or_enum_type(enum_name, prefix)} = {tpe};') + l(f'typedef {as_struct_or_enum_type(enum_name, prefix)} = {tpe};') # Constants are in submodule. l(f'module {as_module_name_for_enum_type(enum_name, prefix)};') value = "-1" @@ -385,7 +385,7 @@ def gen_imports(dep_prefixes): def gen_function_pointer_aliases(): for type in used_aliases: alias_name, right_hand_side = aliases[type] - l(f'def {alias_name} = {right_hand_side};') + l(f'alias {alias_name} = {right_hand_side};') l('') def gen_module(inp, c_prefix, dep_prefixes): |