Skip to content

Commit 040b363

Browse files
authored
Provide init function for initializing library (#11)
1 parent 9a7f198 commit 040b363

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/LibAwsCommon.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,9 @@ for name in names(@__MODULE__; all=true)
4343
@eval export $name
4444
end
4545

46+
function init(allocator=aws_default_allocator())
47+
aws_common_library_init(allocator)
48+
return
49+
end
50+
4651
end

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ using Test, Aqua, LibAwsCommon
77
end
88
@testset "basic usage to test the library loads" begin
99
allocator = aws_default_allocator()
10+
LibAwsCommon.init(allocator)
1011
logpath = joinpath(mktempdir(), "log.txt")
1112
GC.@preserve logpath begin
1213
logger = Ref(aws_logger(C_NULL, C_NULL, C_NULL))

0 commit comments

Comments
 (0)