aboutsummaryrefslogtreecommitdiff
path: root/bindgen
diff options
context:
space:
mode:
authorGustav Olsson <gustav.olsson@hey.com>2022-05-23 16:54:39 +0200
committerGustav Olsson <gustav.olsson@hey.com>2022-05-23 18:36:57 +0200
commit9d95c448ae2105ae89d7153cedbf878ddbb71a21 (patch)
treee5732794428bd52e340e856c3734d0b4b163438e /bindgen
parentea8a628c2e5b83ba4717aae7012230a23ed1566f (diff)
do not use Nim bit fields for now
Diffstat (limited to 'bindgen')
-rw-r--r--bindgen/gen_nim.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bindgen/gen_nim.py b/bindgen/gen_nim.py
index df8758ee..1261c87d 100644
--- a/bindgen/gen_nim.py
+++ b/bindgen/gen_nim.py
@@ -47,7 +47,7 @@ const_bitfield_overrides = {
}
struct_field_type_overrides = {
- 'sapp_event.modifiers': 'sapp_event_modifiers', # note the extra 's' at the end
+ 'sapp_event.modifiers': 'sapp_event_modifier', # type declared above
'sapp_allocator.alloc': 'void * (*)(size_t, void *)',
'sapp_allocator.free': 'void (*)(void *, void *)',
'sg_allocator.alloc': 'void * (*)(size_t, void *)',
@@ -413,9 +413,9 @@ def gen_enum(decl, prefix, bitfield=None):
enum_name_nim = as_nim_type_name(enum_name, prefix)
l('type')
if has_force_u32:
- l(f" {enum_name_nim}* {{.pure, size:sizeof(cint).}} = enum")
+ l(f" {enum_name_nim}* {{.pure, size:sizeof(uint32).}} = enum")
else:
- l(f" {enum_name_nim}* {{.pure.}} = enum")
+ l(f" {enum_name_nim}* {{.pure, size:sizeof(cint).}} = enum")
if has_explicit_values:
# Nim requires explicit enum values to be declared in ascending order
for value in sorted(item_names_by_value):