Skip to content

Commit 728ac6e

Browse files
committed
make XS::Other have separate C function
1 parent 406aae3 commit 728ac6e

File tree

1 file changed

+5
-6
lines changed
  • t/lib/MakeMaker/Test/Setup

1 file changed

+5
-6
lines changed

t/lib/MakeMaker/Test/Setup/XS.pm

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ MODULE = XS::Test PACKAGE = XS::Test
4545
PROTOTYPES: DISABLE
4646
int
4747
is_even(input)
48-
int input
48+
int input
4949
CODE:
5050
RETVAL = (input % 2 == 0);
5151
OUTPUT:
@@ -103,15 +103,14 @@ my $XS_OTHER = <<'END';
103103
#include "EXTERN.h"
104104
#include "perl.h"
105105
#include "XSUB.h"
106+
107+
int is_odd(int input) { return (INVAR % 2 == 1); }
108+
106109
MODULE = XS::Other PACKAGE = XS::Other
107110
PROTOTYPES: DISABLE
108111
int
109112
is_odd(input)
110-
int input
111-
CODE:
112-
RETVAL = (INVAR % 2 == 1);
113-
OUTPUT:
114-
RETVAL
113+
int input
115114
END
116115

117116
my $T_OTHER = <<'END';

0 commit comments

Comments
 (0)