mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
getThreads now indexes with the names again
This commit is contained in:
@@ -302,12 +302,12 @@ namespace sdl
|
|||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
for (unsigned int i = 0; i<count; i++)
|
for (unsigned int i = 0; i<count; i++)
|
||||||
{
|
{
|
||||||
|
// allow names containing \0
|
||||||
|
lua_pushlstring(L, list[i]->getName().c_str(), list[i]->getName().length());
|
||||||
luax_newtype(L, "Thread", THREAD_THREAD_T, (void*) list[i]);
|
luax_newtype(L, "Thread", THREAD_THREAD_T, (void*) list[i]);
|
||||||
list[i]->lock();
|
list[i]->lock();
|
||||||
list[i]->retain();
|
list[i]->retain();
|
||||||
list[i]->unlock();
|
list[i]->unlock();
|
||||||
// allow names containing \0
|
|
||||||
lua_pushlstring(L, list[i]->getName().c_str(), list[i]->getName().length());
|
|
||||||
lua_settable(L, -3);
|
lua_settable(L, -3);
|
||||||
}
|
}
|
||||||
delete[] list;
|
delete[] list;
|
||||||
|
|||||||
Reference in New Issue
Block a user