|
13 | 13 |
|
14 | 14 | ///Tests new |
15 | 15 | /proc/test_new_obj() |
16 | | - return call_ext(BYONDAPI_TEST, "byond:test_new_obj_ffi")() |
| 16 | + var/static/loaded = load_ext(BYONDAPI_TEST, "byond:test_new_obj_ffi") |
| 17 | + return call_ext(loaded)() |
17 | 18 |
|
18 | 19 | ///Tests lists read |
19 | 20 | /proc/test_list_read(list) |
20 | | - return call_ext(BYONDAPI_TEST, "byond:test_list_read_ffi")(list) |
| 21 | + var/static/loaded = load_ext(BYONDAPI_TEST, "byond:test_list_read_ffi") |
| 22 | + return call_ext(loaded)(list) |
21 | 23 |
|
22 | 24 | ///Tests non-assoc lists |
23 | 25 | /proc/test_non_assoc_list(list) |
24 | | - return call_ext(BYONDAPI_TEST, "byond:test_non_assoc_list_ffi")(list) |
| 26 | + var/static/loaded = load_ext(BYONDAPI_TEST, "byond:test_non_assoc_list_ffi") |
| 27 | + return call_ext(loaded)(list) |
25 | 28 |
|
26 | 29 | ///Tests ref |
27 | 30 | /proc/test_ref(turf) |
28 | | - return call_ext(BYONDAPI_TEST, "byond:test_ref_ffi")(turf) |
| 31 | + var/static/loaded = load_ext(BYONDAPI_TEST, "byond:test_ref_ffi") |
| 32 | + return call_ext(loaded)(turf) |
29 | 33 |
|
30 | 34 | ///Tests lists lookup |
31 | 35 | /proc/test_list_key_lookup(list) |
32 | | - return call_ext(BYONDAPI_TEST, "byond:test_list_key_lookup_ffi")(list) |
| 36 | + var/static/loaded = load_ext(BYONDAPI_TEST, "byond:test_list_key_lookup_ffi") |
| 37 | + return call_ext(loaded)(list) |
33 | 38 |
|
34 | 39 | ///Tests length with strings |
35 | 40 | /proc/test_length_with_str(object) |
36 | | - return call_ext(BYONDAPI_TEST, "byond:test_length_with_str_ffi")(object) |
| 41 | + var/static/loaded = load_ext(BYONDAPI_TEST, "byond:test_length_with_str_ffi") |
| 42 | + return call_ext(loaded)(object) |
37 | 43 |
|
38 | 44 | ///Tests block |
39 | 45 | /proc/test_block() |
40 | | - return call_ext(BYONDAPI_TEST, "byond:test_block_ffi")() |
| 46 | + var/static/loaded = load_ext(BYONDAPI_TEST, "byond:test_block_ffi") |
| 47 | + return call_ext(loaded)() |
41 | 48 |
|
42 | 49 | ///Tests lists length |
43 | 50 | /proc/test_length_with_list(list) |
44 | | - return call_ext(BYONDAPI_TEST, "byond:test_length_with_list_ffi")(list) |
| 51 | + var/static/loaded = load_ext(BYONDAPI_TEST, "byond:test_length_with_list_ffi") |
| 52 | + return call_ext(loaded)(list) |
45 | 53 |
|
46 | 54 | ///Tests lists popping |
47 | 55 | /proc/test_list_pop(list) |
48 | | - return call_ext(BYONDAPI_TEST, "byond:test_list_pop_ffi")(list) |
| 56 | + var/static/loaded = load_ext(BYONDAPI_TEST, "byond:test_list_pop_ffi") |
| 57 | + return call_ext(loaded)(list) |
49 | 58 |
|
50 | 59 | ///Tests lists indexing |
51 | 60 | /proc/test_list_index(list) |
52 | | - return call_ext(BYONDAPI_TEST, "byond:test_list_index_ffi")(list) |
| 61 | + var/static/loaded = load_ext(BYONDAPI_TEST, "byond:test_list_index_ffi") |
| 62 | + return call_ext(loaded)(list) |
53 | 63 |
|
54 | 64 | ///Tests lists |
55 | 65 | /proc/test_list_double(list) |
56 | | - return call_ext(BYONDAPI_TEST, "byond:test_list_double_ffi")(list) |
| 66 | + var/static/loaded = load_ext(BYONDAPI_TEST, "byond:test_list_double_ffi") |
| 67 | + return call_ext(loaded)(list) |
57 | 68 |
|
58 | 69 | ///Tests list pushes |
59 | 70 | /proc/test_list_push(list) |
60 | | - return call_ext(BYONDAPI_TEST, "byond:test_list_push_ffi")(list) |
| 71 | + var/static/loaded = load_ext(BYONDAPI_TEST, "byond:test_list_push_ffi") |
| 72 | + return call_ext(loaded)(list) |
61 | 73 |
|
62 | 74 | ///Tests readwrite vars |
63 | 75 | /proc/test_readwrite_var(object) |
64 | | - return call_ext(BYONDAPI_TEST, "byond:test_readwrite_var_ffi")(object) |
| 76 | + var/static/loaded = load_ext(BYONDAPI_TEST, "byond:test_readwrite_var_ffi") |
| 77 | + return call_ext(loaded)(object) |
65 | 78 |
|
66 | 79 | ///Tests proccalls |
67 | 80 | /proc/test_proc_call(object) |
68 | | - return call_ext(BYONDAPI_TEST, "byond:test_proc_call_ffi")(object) |
| 81 | + var/static/loaded = load_ext(BYONDAPI_TEST, "byond:test_proc_call_ffi") |
| 82 | + return call_ext(loaded)(object) |
69 | 83 |
|
70 | 84 | ///Tests pointers |
71 | 85 | /proc/test_ptr(ptr) |
72 | | - return call_ext(BYONDAPI_TEST, "byond:test_ptr_ffi")(ptr) |
| 86 | + var/static/loaded = load_ext(BYONDAPI_TEST, "byond:test_ptr_ffi") |
| 87 | + return call_ext(loaded)(ptr) |
73 | 88 |
|
74 | 89 | ///Tests raw args binds |
75 | 90 | /proc/test_args(...) |
|
79 | 94 |
|
80 | 95 | ///Tests main lib connection |
81 | 96 | /proc/test_connection() |
82 | | - return call_ext(BYONDAPI_TEST, "byond:test_connection_ffi")() |
| 97 | + var/static/loaded = load_ext(BYONDAPI_TEST, "byond:test_connection_ffi") |
| 98 | + return call_ext(loaded)() |
83 | 99 |
|
0 commit comments