void* CLuaState::getGlobalPointer(const std::string& a_name) { void* data = NULL; if (!getGlobalData(a_name, data)){ //BSLIB_LOG_ERROR(ETT_BSLIB_LUA, "»ñµÃLUA[Name=%s]ʧ°Ü", a_name.c_str()); return data; } return data; }
bool CLuaState::getGlobalBoolean(const std::string& a_name) { bool data = 0; if (!getGlobalData(a_name, data)){ //BSLIB_LOG_ERROR(ETT_BSLIB_LUA, "»ñµÃLUA[Name=%s]ʧ°Ü", a_name.c_str()); return data; } return data; }
std::string CLuaState::getGlobalString(const std::string& a_name) { std::string data = ""; if (!getGlobalData(a_name, data)){ //BSLIB_LOG_ERROR(ETT_BSLIB_LUA, "»ñµÃLUA[Name=%s]ʧ°Ü", a_name.c_str()); return data; } return data; }
TInt isab::InnerThread::start_hook(TAny *aPtr) { class TlsGlobalData* newTlsGlobalData = reinterpret_cast<TlsGlobalData*>(aPtr); class ArchGlobalData& archGlobalData = *(newTlsGlobalData->m_archGlobal); setTlsGlobalData(aPtr); class InnerThread* innerThread = newTlsGlobalData->m_innerThread; class CTrapCleanup* tc = CTrapCleanup::New(); TExceptionHandlerPtr eH = archGlobalData.m_exceptionHandler; if(KErrNone != SetExceptionHandler(innerThread->getHandle(), eH)){ ///XXX } TRAPD(trappederror, innerThread->m_runnable->run()); if (trappederror != KErrNone) { #ifdef STORE_TRAP_INFO_IN_FILE char fileName[256]; strncpy(256, fileName, getGlobalData()->m_commondata_base_path); strcat(fileName, "trap.txt"); //XXX may overflow FILE* foo = fopen(fileName, "w"); if(foo){ fprintf(foo, "Error %i in %s\n",trappederror, innerThread->getName()); fclose(foo); } #endif //starts a terminateandjoin process in the main thread. //now exit as gracefully as possible. ::Panic(innerThread->m_thread); } delete tc; innerThread->m_thread->setAlive(false); deleteTlsGlobalData(newTlsGlobalData); // CloseSTDLIB(); if(trappederror != KErrNone){ User::Exit(1); } // The thread has stopped. return 0; }