Propogate return code of Compiler::compile() to caller of bccCompileBC.
diff --git a/lib/bcc/bcc.cpp b/lib/bcc/bcc.cpp
index 6b64d36..054c995 100644
--- a/lib/bcc/bcc.cpp
+++ b/lib/bcc/bcc.cpp
@@ -75,15 +75,16 @@
return result;
}
-extern "C" void bccCompileBC(BCCscript *script) {
- {
+extern "C" int bccCompileBC(BCCscript *script) {
#if defined(__arm__)
- android::StopWatch compileTimer("RenderScript compile time");
+ android::StopWatch compileTimer("RenderScript compile time");
#endif
- int result = script->compiler.compile();
- if (result)
- script->setError(BCC_INVALID_OPERATION);
- }
+
+ int result = script->compiler.compile();
+ if (result)
+ script->setError(BCC_INVALID_OPERATION);
+
+ return result;
}
extern "C" void bccGetScriptInfoLog(BCCscript *script,