mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-23 11:12:42 +01:00
compiler_vm: do not automatically pull in #include prelude if #include detected in code
This commit is contained in:
parent
3255bdcd93
commit
514484a1e6
@ -13,7 +13,7 @@ use warnings;
|
||||
# These are set automatically by the build/commit script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 279,
|
||||
BUILD_REVISION => 280,
|
||||
BUILD_DATE => "2011-01-29",
|
||||
};
|
||||
|
||||
|
@ -568,7 +568,12 @@ $code =~ s/#include <([^>]+)>/#include <$1>\n/g;
|
||||
$code =~ s/#([^ ]+) (.*?)\\n/#$1 $2\n/g;
|
||||
$code =~ s/#([\w\d_]+)\\n/#$1\n/g;
|
||||
|
||||
my $precode = $preludes{$lang} . $code;
|
||||
my $precode;
|
||||
if($code =~ m/#include/) {
|
||||
$precode = $code;
|
||||
} else {
|
||||
$precode = $preludes{$lang} . $code;
|
||||
}
|
||||
$code = '';
|
||||
|
||||
if($lang eq 'C' or $lang eq 'C99' or $lang eq 'C++') {
|
||||
|
Loading…
Reference in New Issue
Block a user