File tree Expand file tree Collapse file tree 1 file changed +23
-3
lines changed
t/lib/MakeMaker/Test/Setup Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -206,16 +206,35 @@ $label2files{xsbuild} = +{
206206 },
207207 } ,
208208 ),
209- ' lib/XS/Other.xs' => $XS_OTHER . <<EOF ,
210- \n int
209+
210+ ' lib/XS/Other.xs' => <<EOF ,
211+ #ifdef __cplusplus
212+ extern "C" { int plus1(int); }
213+ #endif
214+ $XS_OTHER
215+ int
211216plus1(input)
212217 int input
213218 CODE:
214219 RETVAL = plus1(INVAR);
215220 OUTPUT:
216221 RETVAL
217222EOF
218- ' lib/XS/plus1.c' => ' int plus1(i) int i; { return i + 1; }' ,
223+
224+ ' lib/XS/plus1.c' => <<'EOF' ,
225+ #ifdef __cplusplus
226+ extern "C" {
227+ int plus1(int i)
228+ #else
229+ int plus1(i)
230+ int i;
231+ #endif
232+ { return i + 1; }
233+ #ifdef __cplusplus
234+ }
235+ #endif
236+ EOF
237+
219238 ' t/is_odd.t' => <<'END' ,
220239#!/usr/bin/perl -w
221240use Test::More tests => 4;
@@ -224,6 +243,7 @@ ok is_odd(1);
224243ok !is_odd(2);
225244is XS::Other::plus1(3), 4;
226245END
246+
227247};
228248
229249sub virtual_rename {
You can’t perform that action at this time.
0 commit comments