Skip to content

Commit d5a557d

Browse files
add support for multiple contract inner calls
1 parent 3a35a0e commit d5a557d

File tree

3 files changed

+2
-243
lines changed

3 files changed

+2
-243
lines changed

counter.json

Lines changed: 0 additions & 45 deletions
This file was deleted.

counter1.json

Lines changed: 0 additions & 196 deletions
This file was deleted.

src/metadata/libfunc_counter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,11 @@ pub mod libfunc_counter_runtime {
288288
libfunc_counter.count_libfunc(context, module, block, location, libfunc_idx)
289289
}
290290

291-
pub fn get_counter_array() -> *mut u32 {
291+
pub extern "C" fn get_counter_array() -> *mut u32 {
292292
COUNTERS_ARRAY.with(|x| x.get()) as *mut u32
293293
}
294294

295-
pub unsafe extern "C" fn store_and_free_counters_array(counter_id_ptr: *mut u64, libfuncs_amount: usize) {
295+
pub unsafe fn store_and_free_counters_array(counter_id_ptr: *mut u64, libfuncs_amount: usize) {
296296
let counter_array_ptr = get_counter_array();
297297
let counters_vec = slice::from_raw_parts(counter_array_ptr, libfuncs_amount).to_vec();
298298

0 commit comments

Comments
 (0)