diff options
| author | est31 <MTest31@outlook.com> | 2016-12-22 23:16:00 +0100 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2016-12-22 23:16:00 +0100 |
| commit | 81d56b94919dceb7b2e51d70b21a7ca22f852bd5 (patch) | |
| tree | 1e9ef1be1b3295a8673d6e4f0bdeb4c2d3a6015f /src/script/cpp_api/s_async.cpp | |
| parent | 8077612dcb48221281e726a60eb97bf73fde462b (diff) | |
| parent | 231ac33d34dfaaddf292c5f31b1eae43eeefba2d (diff) | |
| download | minetest-81d56b94919dceb7b2e51d70b21a7ca22f852bd5.tar.xz | |
Merge 0.4.15 changes into stable-0.4
0.4.15 release!
Diffstat (limited to 'src/script/cpp_api/s_async.cpp')
| -rw-r--r-- | src/script/cpp_api/s_async.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/script/cpp_api/s_async.cpp b/src/script/cpp_api/s_async.cpp index 9bf3fcf49..1fb84fab6 100644 --- a/src/script/cpp_api/s_async.cpp +++ b/src/script/cpp_api/s_async.cpp @@ -81,6 +81,7 @@ bool AsyncEngine::registerFunction(const char* name, lua_CFunction func) if (initDone) { return false; } + functionList[name] = func; return true; } @@ -203,7 +204,7 @@ void AsyncEngine::pushFinishedJobs(lua_State* L) { /******************************************************************************/ void AsyncEngine::prepareEnvironment(lua_State* L, int top) { - for (std::map<std::string, lua_CFunction>::iterator it = functionList.begin(); + for (UNORDERED_MAP<std::string, lua_CFunction>::iterator it = functionList.begin(); it != functionList.end(); it++) { lua_pushstring(L, it->first.c_str()); lua_pushcfunction(L, it->second); |
