Skip to content

Commit 98cc5e3

Browse files
Frityetwaruqi
andauthored
Added ManagedC (#1232)
* Added ManagedC * fixed formating * Fixed suggestions * v1.4.0 * aaaa * critical bug fix * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua Co-authored-by: ruki <[email protected]>
1 parent 7ca5c4d commit 98cc5e3

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

packages/m/managedc/xmake.lua

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package("managedc")
2+
set_kind("library", { headeronly = true })
3+
set_description("Reference counter garabage collection for C")
4+
5+
add_urls("https://github.com/Frityet/ManagedC.git")
6+
add_versions("1.5.0", "f4cce9c1aee952d603c18b73dc6219ea15b91717")
7+
8+
on_install("linux", "macosx", function (package)
9+
os.cp("src/*.h", package:installdir("include"))
10+
end)
11+
12+
on_test(function (package)
13+
assert(package:check_csnippets({test = [[
14+
#include <stdio.h>
15+
void test() {
16+
void* data = mc_alloc_managed(0, 0, 0);
17+
printf("data: %p\n", data);
18+
}
19+
]]}, {configs = {languages = "c11"}, includes = "managed.h"}))
20+
end)
21+
22+

0 commit comments

Comments
 (0)