@@ -101,14 +101,14 @@ def map_types_to_swift(fn_arg, ret_arr_len, java_c_types_none_allowed, tuple_typ
101
101
if is_ptr :
102
102
res .pass_by_ref = True
103
103
if res .is_native_primitive or res .passed_as_ptr :
104
- return TypeInfo (rust_obj = fn_arg .split (" " )[0 ], java_ty = res .java_ty + "[]" , java_hu_ty = res . java_hu_ty + "[]" ,
105
- java_fn_ty_arg = "[" + res . java_fn_ty_arg , c_ty = res .c_ty + "Array" , passed_as_ptr = False ,
104
+ return TypeInfo (rust_obj = fn_arg .split (" " )[0 ], swift_type = res .swift_type + "[]" ,
105
+ c_ty = res .c_ty + "Array" , passed_as_ptr = False ,
106
106
is_ptr = is_ptr , is_const = is_const ,
107
107
var_name = res .var_name , arr_len = "datalen" , arr_access = "data" , subty = res ,
108
108
is_native_primitive = False )
109
109
else :
110
- return TypeInfo (rust_obj = fn_arg .split (" " )[0 ], java_ty = res .java_ty + "[]" , java_hu_ty = res . java_hu_ty + "[]" ,
111
- java_fn_ty_arg = "[" + res . java_fn_ty_arg , c_ty = language_constants .ptr_arr ,
110
+ return TypeInfo (rust_obj = fn_arg .split (" " )[0 ], swift_type = res .swift_type + "[]" ,
111
+ c_ty = language_constants .ptr_arr ,
112
112
passed_as_ptr = False , is_ptr = is_ptr , is_const = is_const ,
113
113
var_name = res .var_name , arr_len = "datalen" , arr_access = "data" , subty = res ,
114
114
is_native_primitive = False )
@@ -196,12 +196,12 @@ def map_types_to_swift(fn_arg, ret_arr_len, java_c_types_none_allowed, tuple_typ
196
196
if idx != 0 :
197
197
swift_type = swift_type + ", "
198
198
if ty_info .is_native_primitive :
199
- if ty_info .java_hu_ty == "int" :
199
+ if ty_info .swift_type == "int" :
200
200
swift_type = swift_type + "Integer" # Java concrete integer type is Integer, not Int
201
201
else :
202
- swift_type = swift_type + ty_info .java_hu_ty .title () # If we're a primitive, capitalize the first letter
202
+ swift_type = swift_type + ty_info .swift_type .title () # If we're a primitive, capitalize the first letter
203
203
else :
204
- swift_type = swift_type + ty_info .java_hu_ty
204
+ swift_type = swift_type + ty_info .swift_type
205
205
swift_type = swift_type + ">"
206
206
fn_ty_arg = "J"
207
207
fn_arg = name_match
@@ -223,7 +223,7 @@ def map_types_to_swift(fn_arg, ret_arr_len, java_c_types_none_allowed, tuple_typ
223
223
else :
224
224
swift_type = swift_type + ty_info .java_hu_ty .title () # If we're a primitive, capitalize the first letter
225
225
else :
226
- swift_type = swift_type + ty_info .java_hu_ty
226
+ swift_type = swift_type + ty_info .swift_type
227
227
swift_type = swift_type + ">"
228
228
fn_ty_arg = "J"
229
229
fn_arg = name_match
0 commit comments