-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from membraneframework/nested-struct-segfault
Nested struct list segfault
- Loading branch information
Showing
19 changed files
with
1,748 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ defmodule MyApp.Mixfile do | |
|
||
defp deps() do | ||
[ | ||
{:unifex, "~>> 1.1.1"} | ||
{:unifex, "~>> 1.1.3"} | ||
] | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
defmodule Unifex.App do | ||
@moduledoc false | ||
use Application | ||
|
||
@impl true | ||
def start(_type, _args) do | ||
children = [Unifex.Counter] | ||
opts = [strategy: :one_for_one, name: __MODULE__] | ||
Supervisor.start_link(children, opts) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
defmodule Unifex.Counter do | ||
@moduledoc false | ||
use Agent | ||
|
||
@spec start_link(any) :: Agent.on_start() | ||
def start_link(_opts) do | ||
Agent.start_link(fn -> 0 end, name: __MODULE__) | ||
end | ||
|
||
@spec get_and_increment() :: integer() | ||
def get_and_increment do | ||
Agent.get_and_update(__MODULE__, fn state -> {state, state + 1} end) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.