summaryrefslogtreecommitdiff
path: root/src/ModuleCache.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-10-30 13:43:49 (GMT)
committerMarius Kintel <marius@kintel.net>2012-10-30 13:43:49 (GMT)
commit467f8968434c9a46c17edae1bfdba5eb1c756eff (patch)
treeb44bfd37aaa8a835af72bbde9426895ea9c85b04 /src/ModuleCache.cc
parent73d8d3cca4de55e81d47732f2b1f9507cc0d23b4 (diff)
parent65c57886769b86cf785ab2049d32311c4c52126a (diff)
Merge branch 'master' into issue202svg
Diffstat (limited to 'src/ModuleCache.cc')
-rw-r--r--src/ModuleCache.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ModuleCache.cc b/src/ModuleCache.cc
index c215342..19a3f84 100644
--- a/src/ModuleCache.cc
+++ b/src/ModuleCache.cc
@@ -72,7 +72,9 @@ Module *ModuleCache::evaluate(const std::string &filename)
PRINTB("WARNING: Can't open library file '%s'\n", filename);
return NULL;
}
- std::string text((std::istreambuf_iterator<char>(ifs)), std::istreambuf_iterator<char>());
+ std::stringstream textbuf;
+ textbuf << ifs.rdbuf();
+ textbuf << "\n" << commandline_commands;
print_messages_push();
@@ -84,7 +86,7 @@ Module *ModuleCache::evaluate(const std::string &filename)
this->entries[filename] = e;
std::string pathname = boosty::stringy(fs::path(filename).parent_path());
- lib_mod = dynamic_cast<Module*>(parse(text.c_str(), pathname.c_str(), false));
+ lib_mod = dynamic_cast<Module*>(parse(textbuf.str().c_str(), pathname.c_str(), false));
PRINTB_NOCACHE(" compiled module: %p", lib_mod);
if (lib_mod) {
contact: Jan Huwald // Impressum