@@ -116,7 +116,7 @@ mod sys {
116
116
{
117
117
let f: TypedFunction < ( ) , i32 > = instance
118
118
. exports
119
- . get_native_function ( "call_host_func_with_wasm_func" ) ?;
119
+ . get_typed_function ( "call_host_func_with_wasm_func" ) ?;
120
120
let result = f. call ( ) ?;
121
121
assert_eq ! ( result, 63 ) ;
122
122
}
@@ -183,7 +183,7 @@ mod sys {
183
183
panic ! ( "result is not an extern ref!" ) ;
184
184
}
185
185
186
- let f: TypedFunction < ( ) , ExternRef > = instance. exports . get_native_function ( run) ?;
186
+ let f: TypedFunction < ( ) , ExternRef > = instance. exports . get_typed_function ( run) ?;
187
187
let result: ExternRef = f. call ( ) ?;
188
188
assert ! ( result. is_null( ) ) ;
189
189
}
@@ -200,7 +200,7 @@ mod sys {
200
200
}
201
201
202
202
let f: TypedFunction < ( ) , ExternRef > =
203
- instance. exports . get_native_function ( get_hashmap) ?;
203
+ instance. exports . get_typed_function ( get_hashmap) ?;
204
204
205
205
let result: ExternRef = f. call ( ) ?;
206
206
let inner: & HashMap < String , String > = result. downcast ( ) . unwrap ( ) ;
@@ -222,7 +222,7 @@ mod sys {
222
222
)"# ;
223
223
let module = Module :: new ( & store, wat) ?;
224
224
let instance = Instance :: new ( & module, & imports ! { } ) ?;
225
- let f: TypedFunction < ExternRef , ( ) > = instance. exports . get_native_function ( "drop" ) ?;
225
+ let f: TypedFunction < ExternRef , ( ) > = instance. exports . get_typed_function ( "drop" ) ?;
226
226
227
227
let er = ExternRef :: new ( 3u32 ) ;
228
228
f. call ( er. clone ( ) ) ?;
@@ -316,7 +316,7 @@ mod sys {
316
316
let instance = Instance :: new ( & module, & imports ! { } ) ?;
317
317
318
318
let f: TypedFunction < ( ExternRef , i32 ) , ExternRef > =
319
- instance. exports . get_native_function ( "insert_into_table" ) ?;
319
+ instance. exports . get_typed_function ( "insert_into_table" ) ?;
320
320
321
321
let er = ExternRef :: new ( 3usize ) ;
322
322
@@ -359,7 +359,7 @@ mod sys {
359
359
assert_eq ! ( er. strong_count( ) , 2 ) ;
360
360
}
361
361
let get_from_global: TypedFunction < ( ) , ExternRef > =
362
- instance. exports . get_native_function ( "get_from_global" ) ?;
362
+ instance. exports . get_typed_function ( "get_from_global" ) ?;
363
363
364
364
let er = get_from_global. call ( ) ?;
365
365
assert_eq ! ( er. strong_count( ) , 2 ) ;
@@ -383,7 +383,7 @@ mod sys {
383
383
let instance = Instance :: new ( & module, & imports ! { } ) ?;
384
384
385
385
let pass_extern_ref: TypedFunction < ExternRef , ( ) > =
386
- instance. exports . get_native_function ( "pass_extern_ref" ) ?;
386
+ instance. exports . get_typed_function ( "pass_extern_ref" ) ?;
387
387
388
388
let er = ExternRef :: new ( 3usize ) ;
389
389
assert_eq ! ( er. strong_count( ) , 1 ) ;
@@ -411,14 +411,12 @@ mod sys {
411
411
let module = Module :: new ( & store, wat) ?;
412
412
let instance = Instance :: new ( & module, & imports ! { } ) ?;
413
413
414
- let grow_table_with_ref: TypedFunction < ( ExternRef , i32 ) , i32 > = instance
415
- . exports
416
- . get_native_function ( "grow_table_with_ref" ) ?;
417
- let fill_table_with_ref: TypedFunction < ( ExternRef , i32 , i32 ) , ( ) > = instance
418
- . exports
419
- . get_native_function ( "fill_table_with_ref" ) ?;
414
+ let grow_table_with_ref: TypedFunction < ( ExternRef , i32 ) , i32 > =
415
+ instance. exports . get_typed_function ( "grow_table_with_ref" ) ?;
416
+ let fill_table_with_ref: TypedFunction < ( ExternRef , i32 , i32 ) , ( ) > =
417
+ instance. exports . get_typed_function ( "fill_table_with_ref" ) ?;
420
418
let copy_into_table2: TypedFunction < ( ) , ( ) > =
421
- instance. exports . get_native_function ( "copy_into_table2" ) ?;
419
+ instance. exports . get_typed_function ( "copy_into_table2" ) ?;
422
420
let table1: & Table = instance. exports . get_table ( "table1" ) ?;
423
421
let table2: & Table = instance. exports . get_table ( "table2" ) ?;
424
422
0 commit comments