mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +02:00
Changed getThreads so that the caller must allocate the memory.
This commit is contained in:
@@ -303,16 +303,18 @@ namespace sdl
|
||||
return i->second;
|
||||
}
|
||||
|
||||
Thread **ThreadModule::getThreads()
|
||||
void ThreadModule::getThreads(Thread ** list)
|
||||
{
|
||||
Thread **list = new Thread*[threads.size()+1];
|
||||
int c = 0;
|
||||
for (threadlist_t::iterator i = threads.begin(); i != threads.end(); i++, c++)
|
||||
{
|
||||
list[c] = i->second;
|
||||
}
|
||||
list[threads.size()] = 0;
|
||||
return list;
|
||||
}
|
||||
|
||||
unsigned ThreadModule::getThreadCount() const
|
||||
{
|
||||
return threads.size();
|
||||
}
|
||||
|
||||
void ThreadModule::unregister(const std::string & name)
|
||||
|
||||
Reference in New Issue
Block a user