1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
use File::Spec;
use lib (File::Spec->catdir(File::Spec->updir(),'blib','lib'), File::Spec->catdir(File::Spec->curdir(),'blib','lib'));
use strict;
use Test;
use diagnostics;
use Inline Config => DIRECTORY => '_Inline_test';
BEGIN {
plan(tests => 1,
todo => [],
onfail => sub {},
);
}
use Inline 'C';
$main::myvar = $main::myvar = "myvalue";
# test 1
ok(lookup('main::myvar') eq "myvalue");
__END__
__C__
SV* lookup(char* var) {
return perl_get_sv(var, 0);
}
|