summaryrefslogtreecommitdiff
path: root/src/parser.y
diff options
context:
space:
mode:
authorclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2010-02-28 13:59:43 (GMT)
committerclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2010-02-28 13:59:43 (GMT)
commit496d236903f399dd54f1073e20e899e49aa48c1f (patch)
treeadb299455d62fa6a6177e1600eb09c26d4c087b8 /src/parser.y
parentd3329838b4d948455277caa3c24df4b7b50fabb2 (diff)
Clifford Wolf:
Some fixes regarding 'use <filename>' git-svn-id: http://svn.clifford.at/openscad/trunk@460 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'src/parser.y')
-rw-r--r--src/parser.y5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/parser.y b/src/parser.y
index 81f691d..4bae6a3 100644
--- a/src/parser.y
+++ b/src/parser.y
@@ -597,6 +597,7 @@ AbstractModule *parse(const char *text, const char *path, int debug)
module->usedlibs[i.key()] = Module::compile_library(i.key());
if (!module->usedlibs[i.key()]) {
PRINTF("WARNING: Failed to compile library `%s'.", i.key().toUtf8().data());
+ module->usedlibs.remove(i.key());
}
}
@@ -616,7 +617,7 @@ Module *Module::compile_library(QString filename)
cache_id.sprintf("%x.%x", (int)st.st_mtime, (int)st.st_size);
if (libs_cache.contains(filename) && libs_cache[filename].cache_id == cache_id) {
- PRINT(libs_cache[cache_id].msg);
+ PRINT(libs_cache[filename].msg);
return &(*libs_cache[filename].mod);
}
@@ -630,7 +631,7 @@ Module *Module::compile_library(QString filename)
print_messages_push();
PRINTF("Compiling library `%s'.", filename.toUtf8().data());
- libs_cache_ent e = { NULL, cache_id, QString("WARNING: Library `%1' tries to recursively use itself!\n").arg(filename) };
+ libs_cache_ent e = { NULL, cache_id, QString("WARNING: Library `%1' tries to recursively use itself!").arg(filename) };
if (libs_cache.contains(filename))
delete libs_cache[filename].mod;
libs_cache[filename] = e;
contact: Jan Huwald // Impressum