aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatheus Catarino <matheus-catarino@hotmail.com>2025-05-31 18:03:42 -0300
committerMatheus Catarino <matheus-catarino@hotmail.com>2025-05-31 18:03:42 -0300
commitb00d47d0c35dea6e5e8f8d5847f26f0be66dc3ef (patch)
tree38494dc067d11e0f621e2b13baba154b11c70d0f
parent182e4f26a9b08ffcaabf0230f9fc1951d4f68064 (diff)
gen_d: fixing field_name members
-rw-r--r--bindgen/gen_d.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/bindgen/gen_d.py b/bindgen/gen_d.py
index c629c705..b02cf0a8 100644
--- a/bindgen/gen_d.py
+++ b/bindgen/gen_d.py
@@ -94,7 +94,7 @@ prim_types = {
"float": "float",
"double": "double",
"uintptr_t": "ulong",
- "intptr_t": "long",
+ "intptr_t": "long",
"size_t": "size_t",
}
@@ -112,7 +112,7 @@ prim_defaults = {
'float': '0.0f',
'double': '0.0',
'uintptr_t': '0',
- 'intptr_t': '0',
+ 'intptr_t': '0',
'size_t': '0'
}
@@ -279,8 +279,7 @@ def gen_struct(decl, type_converter):
used_field_names = set()
for field in decl['fields']:
field_key = f"{struct_name}.{field['name']}"
- field_name = overrides.get(field_key, field['name'])
- field_name = overrides.get(field_name, field_name)
+ field_name = overrides.get(field['name'], field['name'])
field_type = overrides.get(field_key, field['type'])
if field_name in used_field_names or field_name in prim_types.values():