Skip to content

Commit 10dd563

Browse files
committed
[C#] Very marginally clean up get_java_arr_elem conditionals
1 parent 6d1f74c commit 10dd563

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

csharp_strings.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -576,12 +576,12 @@ def get_java_arr_len(self, arr_name):
576576
return "InternalUtils.getArrayLength(" + arr_name + ")"
577577

578578
def get_java_arr_elem(self, elem_ty, arr_name, idx):
579-
if elem_ty.c_ty == "int64_t" or elem_ty.c_ty == "uint64_t" or elem_ty.c_ty.endswith("Array") or elem_ty.c_ty == "uintptr_t":
579+
if elem_ty.c_ty == "int64_t" or elem_ty.c_ty == "uint64_t":
580+
return "InternalUtils.getU64ArrayElem(" + arr_name + ", " + idx + ")"
581+
elif elem_ty.c_ty.endswith("Array") or elem_ty.c_ty == "uintptr_t" or elem_ty.rust_obj == "LDKStr":
580582
return "InternalUtils.getU64ArrayElem(" + arr_name + ", " + idx + ")"
581583
elif elem_ty.rust_obj == "LDKU5":
582584
return "InternalUtils.getU8ArrayElem(" + arr_name + ", " + idx + ")"
583-
elif elem_ty.rust_obj == "LDKStr":
584-
return "InternalUtils.getU64ArrayElem(" + arr_name + ", " + idx + ")"
585585
else:
586586
assert False
587587

0 commit comments

Comments
 (0)