diff -r 6030e0b46fe2 -r 2b8512340180 src/API.cpp --- a/src/API.cpp Sat Dec 22 18:25:31 2012 -0800 +++ b/src/API.cpp Sat Dec 22 19:48:43 2012 -0800 @@ -91,7 +91,7 @@ return Ke::Local(reinterpret_cast(Ke::HandleScope::CreateHandle(from))); } -ke::Module * +bool InternalCompile(const char *path) { PoolScope poolScope(ZONE()->pool()); @@ -102,36 +102,20 @@ unit->path_ = path; if (!cc.addTranslationUnit(unit)) - return NULL; + return false; if (!cc.compile()) - return NULL; - - return NULL; + return false; -#if 0 - ke::Local module(ZONE(), CompileFromSource(cc, path, bytes, length)); - delete [] bytes; - if (!module) - return NULL; - - ke::Local pathstr(ZONE(), ke::String::New(ZONE(), path, Heap::Tenure_Old)); - if (!pathstr) - return NULL; - - module->setPath(pathstr); - return module; -#endif - return NULL; + return true; } // This is split out from InternalCompile so the RootScope doesn't conflict // with making a return handle. -Ke::Local +bool Ke::Compile(const char *path) { - ke::Local module(ZONE(), InternalCompile(path)); - return ToLocal(module); + return InternalCompile(path); } void