X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=bindingstypes.py;h=8c3f0db8e7e520a5cbde12a338e1e4fcb2b4ebfe;hb=ebef1f83fe4f70ba2f5c683a69f08e7ba32c8ad3;hp=bd123ac3a6f603739f9eb8d0d0ea8c1d72d514d5;hpb=1b870a3ffab1c0024411e30102bc6d198300f095;p=ldk-java diff --git a/bindingstypes.py b/bindingstypes.py index bd123ac3..8c3f0db8 100644 --- a/bindingstypes.py +++ b/bindingstypes.py @@ -1,5 +1,5 @@ class TypeInfo: - def __init__(self, is_native_primitive, rust_obj, java_ty, java_fn_ty_arg, java_hu_ty, c_ty, is_const, passed_as_ptr, is_ptr, nonnull_ptr, var_name, arr_len, arr_access, subty=None): + def __init__(self, is_native_primitive, rust_obj, java_ty, java_fn_ty_arg, java_hu_ty, c_ty, is_const, passed_as_ptr, is_ptr, nonnull_ptr, var_name, arr_len, arr_access, subty=None, contains_trait=False): self.is_native_primitive = is_native_primitive self.rust_obj = rust_obj self.java_ty = java_ty @@ -16,6 +16,7 @@ class TypeInfo: self.subty = subty self.pass_by_ref = is_ptr self.requires_clone = None + self.contains_trait = contains_trait def get_full_rust_ty(self): ret = "" @@ -65,6 +66,8 @@ class ConvInfo: self.to_hu_conv = to_hu_conv self.to_hu_conv_name = to_hu_conv_name self.from_hu_conv = from_hu_conv + # This is set based on docstrings in various contexts: + self.nullable = False class TraitMethInfo: def __init__(self, fn_name, self_is_const, ret_ty_info, args_ty, docs): @@ -75,6 +78,8 @@ class TraitMethInfo: self.docs = docs class ComplexEnumVariantInfo: - def __init__(self, var_name, fields): + def __init__(self, var_name, var_docs, fields, tuple_variant): self.var_name = var_name + self.var_docs = var_docs self.fields = fields + self.tuple_variant = tuple_variant