Add the CacheReader. (incomplete)
diff --git a/lib/bcc/Script.cpp b/lib/bcc/Script.cpp
index 6240ac7..48b75e0 100644
--- a/lib/bcc/Script.cpp
+++ b/lib/bcc/Script.cpp
@@ -19,7 +19,7 @@
#include "Script.h"
-//#include "CacheReader.h"
+#include "CacheReader.h"
//#include "CacheWriter.h"
#include "FileHandle.h"
#include "ScriptCompiled.h"
@@ -191,8 +191,7 @@
return 1;
}
-#if 0
- CacheReader reader;
+ CacheReader reader(this);
ScriptCached *cached = reader.readCacheFile(&file);
if (!cached) {
@@ -201,9 +200,8 @@
mCached = cached;
mStatus = ScriptStatus::Cached;
-#endif
- return 1;
+ return 0;
}
@@ -331,7 +329,7 @@
mCompiled->getFunctions(actualFunctionCount, maxFunctionCount, functions);
}
-void const *Script::getContext() const {
+char const *Script::getContext() const {
if (mStatus != ScriptStatus::Compiled) {
//mErrorCode = BCC_INVALID_OPERATION;
return NULL;