Skip to content

Commit fd4bb9d

Browse files
authored
Merge pull request #14 from NelsonVides/use_on_load_directive
Use on_load module attribute
2 parents 7688cf9 + 955861b commit fd4bb9d

File tree

5 files changed

+13
-124
lines changed

5 files changed

+13
-124
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
otp: ['19.3', '21.3', 24]
13-
runs-on: ubuntu-20.04
12+
otp: ['20', '21', '22', '23', '24', '25', '26', '27']
13+
runs-on: ubuntu-24.04
1414
container:
1515
image: erlang:${{ matrix.otp }}
1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v4
1818
- run: rebar3 compile
1919
- run: rebar3 xref
2020
- run: rebar3 dialyzer
@@ -23,9 +23,13 @@ jobs:
2323
cover:
2424
name: Cover
2525
needs: [tests]
26-
runs-on: ubuntu-20.04
26+
runs-on: ubuntu-24.04
2727
steps:
28-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v4
29+
- uses: erlef/setup-beam@v1
30+
with:
31+
otp-version: '27'
32+
rebar3-version: "3.24.0"
2933
- run: ./configure --enable-gcov
3034
- run: rebar3 compile
3135
- name: Run tests to obtain Erlang coverage

src/stringprep.app.src

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
{modules, []},
2727
{registered, []},
2828
{applications, [kernel, stdlib, p1_utils]},
29-
{mod, {stringprep_app,[]}},
3029

3130
%% hex.pm packaging:
3231
{files, ["src/", "c_src/stringprep.cpp", "c_src/uni_data.c", "c_src/uni_norm.c", "configure", "rebar.config", "rebar.config.script", "vars.config.in", "README.md", "LICENSE.txt", "LICENCE.ALL", "LICENSE.TCL"]},

src/stringprep.erl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
%%%----------------------------------------------------------------------
2323

2424
-module(stringprep).
25+
-on_load(load_nif/0).
26+
-nifs([tolower/1, tolower_nofilter/1, nameprep/1, nodeprep/1, resourceprep/1]).
2527

2628
-author('[email protected]').
2729

28-
-compile(no_native).
29-
30-
-export([start/0, load_nif/0, tolower/1, nameprep/1,
31-
nodeprep/1, resourceprep/1, tolower_nofilter/1]).
30+
-export([start/0, tolower/1, nameprep/1,
31+
nodeprep/1, resourceprep/1, tolower_nofilter/1]).
3232

3333
%%%===================================================================
3434
%%% API functions

src/stringprep_app.erl

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

src/stringprep_sup.erl

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

0 commit comments

Comments
 (0)