mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Move scriptapi to separate folder (by sapier)
On the lua side, notably minetest.env:<function>(<args>) should now be replaced by minetest.<function>(<args>). The old way is and will stay supported for a long time. Also: Update and clean up lua_api.txt (by celeron55) Move EnvRef to lua and remove add_rat and add_firefly (by kahrl) Add separate src/util/CMakeLists.txt, other minor fixes (by kahrl)
This commit is contained in:
parent
865f380c91
commit
ab43377577
87 changed files with 6401 additions and 5584 deletions
|
@ -57,6 +57,7 @@ public:
|
|||
int Lock();
|
||||
int Unlock();
|
||||
bool IsInitialized() { return initialized; }
|
||||
|
||||
private:
|
||||
#if (defined(WIN32) || defined(_WIN32_WCE))
|
||||
#ifdef JMUTEX_CRITICALSECTION
|
||||
|
@ -66,6 +67,14 @@ private:
|
|||
#endif // JMUTEX_CRITICALSECTION
|
||||
#else // pthread mutex
|
||||
pthread_mutex_t mutex;
|
||||
|
||||
bool IsLocked() {
|
||||
if (pthread_mutex_trylock(&mutex)) {
|
||||
pthread_mutex_unlock(&mutex);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif // WIN32
|
||||
bool initialized;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue