Unify naming of type lookups in c_type_map dict
authorMatt Corallo <git@bluematt.me>
Mon, 25 Jan 2021 18:10:25 +0000 (13:10 -0500)
committerMatt Corallo <git@bluematt.me>
Mon, 25 Jan 2021 21:09:09 +0000 (16:09 -0500)
genbindings.py
java_strings.py
typescript_strings.py

index 221b1bd823132dffe4930774324a166bab0ae8fc..f47cce3699d823ab2f972ba47e161f2d69791fef 100755 (executable)
@@ -214,7 +214,7 @@ def java_c_types(fn_arg, ret_arr_len):
         is_primitive = True
     elif fn_arg.startswith("uint64_t") or fn_arg.startswith("uintptr_t"):
         # TODO: uintptr_t is arch-dependent :(
-        mapped_type = consts.c_type_map['long']
+        mapped_type = consts.c_type_map['uint64_t']
         java_ty = mapped_type[0]
         c_ty = "int64_t"
         fn_ty_arg = "J"
index d73a15de87328d4114350a387f28a88e978a38b3..16f59b62dcbb940883d6cd6d388bd2a6aa9025c3 100644 (file)
@@ -7,7 +7,7 @@ class Consts:
             uint8_t = ['byte'],
             uint16_t = ['short'],
             uint32_t = ['int'],
-            long = ['long'],
+            uint64_t = ['long'],
         )
 
         self.to_hu_conv_templates = dict(
index a76aeadb01f5c446a99629a491a0cbbdb3aae85c..e3dd3c602375f2ba6a50a18edc2b24cbc91d918a 100644 (file)
@@ -17,7 +17,7 @@ class Consts:
             uint8_t = ['number', 'Uint8Array'],
             uint16_t = ['number', 'Uint16Array'],
             uint32_t = ['number', 'Uint32Array'],
-            long = ['number'],
+            uint64_t = ['number'],
         )
 
         self.to_hu_conv_templates = dict(