File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // Copyright (c) 2022-present INESC-ID.
2+ // Distributed under the MIT license that can be found in the LICENSE file.
3+
4+ #include < new>
5+
6+ void *f1 (std::size_t a0) { return ::operator new (a0); }
7+
8+ void f2 (void *a0) { return ::operator delete (a0); }
9+
10+ void *f3 (std::size_t a0) { return ::operator new [](a0); }
11+
12+ void f4 (void *a0) { return ::operator delete[] (a0); }
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2022-present INESC-ID.
2+ // Distributed under the MIT license that can be found in the LICENSE file.
3+
4+ use libcc2rs:: * ;
5+
6+ fn f1 ( a0 : usize ) -> AnyPtr {
7+ libcc2rs:: malloc_refcount ( a0)
8+ }
9+
10+ fn f2 ( a0 : AnyPtr ) {
11+ libcc2rs:: free_refcount ( a0)
12+ }
13+
14+ fn f3 ( a0 : usize ) -> AnyPtr {
15+ libcc2rs:: malloc_refcount ( a0)
16+ }
17+
18+ fn f4 ( a0 : AnyPtr ) {
19+ libcc2rs:: free_refcount ( a0)
20+ }
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2022-present INESC-ID.
2+ // Distributed under the MIT license that can be found in the LICENSE file.
3+
4+ unsafe fn f1 ( a0 : usize ) -> * mut :: libc:: c_void {
5+ libcc2rs:: malloc_unsafe ( a0)
6+ }
7+
8+ unsafe fn f2 ( a0 : * mut :: libc:: c_void ) {
9+ libcc2rs:: free_unsafe ( a0)
10+ }
11+
12+ unsafe fn f3 ( a0 : usize ) -> * mut :: libc:: c_void {
13+ libcc2rs:: malloc_unsafe ( a0)
14+ }
15+
16+ unsafe fn f4 ( a0 : * mut :: libc:: c_void ) {
17+ libcc2rs:: free_unsafe ( a0)
18+ }
You can’t perform that action at this time.
0 commit comments