mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 16:39:36 +00:00
Make the C++ test export the expected symbol
Use `namespace` instead of `class` and mark as `extern "C"`.
This commit is contained in:
parent
b2ccf6cf8e
commit
b716ae24a5
@ -202,7 +202,7 @@ sub have_compiler {
|
||||
binmode $FH;
|
||||
|
||||
if ( $is_cplusplus ) {
|
||||
print $FH "class Bogus { public: int boot_compilet() { return 1; } };\n";
|
||||
print $FH q<namespace Bogus { extern "C" int boot_compilet() { return 1; } };> . "\n";
|
||||
}
|
||||
else {
|
||||
print $FH "int boot_compilet(void) { return 1; }\n";
|
||||
|
||||
2
dist/ExtUtils-CBuilder/t/03-cplusplus.t
vendored
2
dist/ExtUtils-CBuilder/t/03-cplusplus.t
vendored
@ -33,7 +33,7 @@ ok $b->have_cplusplus, "have_cplusplus";
|
||||
$source_file = File::Spec->catfile('t', 'cplust.cc');
|
||||
{
|
||||
open my $FH, '>', $source_file or die "Can't create $source_file: $!";
|
||||
print $FH "class Bogus { public: int boot_cplust() { return 1; } };\n";
|
||||
print $FH q<namespace Bogus { extern "C" int boot_cplust() { return 1; } };> . "\n";
|
||||
close $FH;
|
||||
}
|
||||
ok -e $source_file, "source file '$source_file' created";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user