use templates for human type conversions
[ldk-java] / java_strings.py
index b66157eb80be4580e1f857b2a979925227074e05..c9a32171b738c289cf645c57781ffbffe2366966 100644 (file)
@@ -2,6 +2,19 @@ from bindingstypes import *
 
 class Consts:
     def __init__(self, DEBUG):
+
+        self.c_type_map = dict(
+            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;
 import java.util.LinkedList;
 class CommonBase {