Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 37 additions & 23 deletions .github/workflows/testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: perl -V
- name: install dependencies
uses: perl-actions/install-with-cpm@v1
uses: perl-actions/install-with-cpm@stable
with:
cpanfile: "cpanfile"
- name: Makefile.PL
Expand All @@ -35,9 +35,7 @@ jobs:
needs: [ubuntu]
env:
PERL_USE_UNSAFE_INC: 0
AUTHOR_TESTING: 1
AUTOMATED_TESTING: 1
RELEASE_TESTING: 1

runs-on: ubuntu-latest

Expand All @@ -46,6 +44,10 @@ jobs:
matrix:
perl-version:
[
"5.40",
"5.38",
"5.36",
"5.34",
"5.32",
"5.30",
"5.28",
Expand All @@ -58,48 +60,60 @@ jobs:
"5.14",
"5.12",
"5.10",
"5.8",
]

container:
image: perl:${{ matrix.perl-version }}

steps:
- uses: actions/checkout@v2
- run: perl -V
- name: install dependencies
uses: perl-actions/install-with-cpm@v1
- uses: actions/checkout@v4
- name: Set up perl ${{ matrix.perl-version }}
uses: shogo82148/actions-setup-perl@v1
with:
sudo: false
cpanfile: "cpanfile"
perl-version: ${{ matrix.perl-version }}
- run: perl -V
- name: Makefile.PL
run: perl -I$(pwd) Makefile.PL
- name: make
run: make
- name: make test
run: make test

macOS:
needs: [ubuntu]
env:
PERL_USE_UNSAFE_INC: 0
AUTHOR_TESTING: 1
AUTOMATED_TESTING: 1
RELEASE_TESTING: 1

runs-on: macOS-latest

strategy:
fail-fast: false
matrix:
perl-version: [latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: perl -V
- name: install dependencies
uses: perl-actions/install-with-cpm@v1
uses: perl-actions/install-with-cpm@stable
with:
cpanfile: "cpanfile"
- name: Makefile.PL
run: perl -I$(pwd) Makefile.PL
- name: make test
run: make test

windows:
needs: [ubuntu]
env:
PERL_USE_UNSAFE_INC: 0
AUTOMATED_TESTING: 1

runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- name: Set up Strawberry Perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: "5.38"
- run: perl -V
- name: Makefile.PL
run: perl Makefile.PL
- name: make
run: gmake
- name: make test
run: gmake test
40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

10 changes: 7 additions & 3 deletions MD5.xs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
# define PERL_MAGIC_ext '~'
#endif

#ifndef Newx
# define Newx(v,n,t) New(0,v,n,t)
#endif

#ifndef Newxz
# define Newxz(v,n,t) Newz(0,v,n,t)
#endif
Expand Down Expand Up @@ -127,7 +131,7 @@ STATIC int dup_md5_ctx(pTHX_ MAGIC *mg, CLONE_PARAMS *params)
{
MD5_CTX *new_ctx;
PERL_UNUSED_VAR(params);
New(55, new_ctx, 1, MD5_CTX);
Newx(new_ctx, 1, MD5_CTX);
memcpy(new_ctx, mg->mg_ptr, sizeof(MD5_CTX));
mg->mg_ptr = (char *)new_ctx;
return 0;
Expand Down Expand Up @@ -582,7 +586,7 @@ new(xclass)
if (!SvROK(xclass)) {
STRLEN my_na;
const char *sclass = SvPV(xclass, my_na);
New(55, context, 1, MD5_CTX);
Newx(context, 1, MD5_CTX);
ST(0) = sv_2mortal(new_md5_ctx(aTHX_ context, sclass));
} else {
context = get_md5_ctx(aTHX_ xclass);
Expand All @@ -598,7 +602,7 @@ clone(self)
const char *myname = sv_reftype(SvRV(self),TRUE);
MD5_CTX* context;
PPCODE:
New(55, context, 1, MD5_CTX);
Newx(context, 1, MD5_CTX);
ST(0) = sv_2mortal(new_md5_ctx(aTHX_ context, myname));
memcpy(context,cont,sizeof(MD5_CTX));
XSRETURN(1);
Expand Down
2 changes: 1 addition & 1 deletion t/files.t
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ EOT
# This is the output of: 'md5sum README MD5.xs rfc1321.txt'
$EXPECT = <<EOT;
2f93400875dbb56f36691d5f69f3eba5 README
f4b5da4e0f19b4c0ab374b7085ed8955 MD5.xs
7b168740795470f6499de3a97cde3d05 MD5.xs
754b9db19f79dbc4992f7166eb0f37ce rfc1321.txt
EOT
}
Expand Down
Loading