use templates for human type conversions
[ldk-java] / java_strings.py
index 0a479de3c594402c97d5e780057ae58fa1ba8669..c9a32171b738c289cf645c57781ffbffe2366966 100644 (file)
@@ -4,7 +4,15 @@ class Consts:
     def __init__(self, DEBUG):
 
         self.c_type_map = dict(
-            byte = ['byte'],
+            uint8_t = ['byte'],
+            uint16_t = ['short'],
+            uint32_t = ['int'],
+            long = ['long'],
+        )
+
+        self.to_hu_conv_templates = dict(
+            ptr = '{human_type} {var_name}_hu_conv = new {human_type}(null, {var_name});',
+            default = '{human_type} {var_name}_hu_conv = new {human_type}(null, {var_name});'
         )
 
         self.common_base = """package org.ldk.structs;