X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fscripting%2Fthread_queue.cpp;h=6ecaef392c53c780594946d45c3ac849af6a39f0;hb=c38774eb23527f0e99a3d90e023ade6074100144;hp=100db79c11cb8f574ee55131ce05eb9ce32ae78c;hpb=c62711567861587107d124642db29e2674ee6533;p=supertux.git diff --git a/src/scripting/thread_queue.cpp b/src/scripting/thread_queue.cpp index 100db79c1..6ecaef392 100644 --- a/src/scripting/thread_queue.cpp +++ b/src/scripting/thread_queue.cpp @@ -1,4 +1,4 @@ -// $Id: wrapper_util.cpp 3327 2006-04-13 15:02:40Z ravu_al_hemio $ +// $Id$ // // SuperTux // Copyright (C) 2006 Matthias Braun @@ -46,10 +46,10 @@ ThreadQueue::add(HSQUIRRELVM vm) sq_pop(global_vm, 2); throw SquirrelError(global_vm, "Couldn't get thread weakref from vm"); } - sq_addref(global_vm, &object); + sq_addref(global_vm, &object); threads.push_back(object); - sq_pop(global_vm, 2); + sq_pop(global_vm, 2); } void @@ -63,7 +63,7 @@ ThreadQueue::wakeup() size_t size_begin = threads.size(); while(i != end) { HSQOBJECT object = threads[i]; - + sq_pushobject(global_vm, object); sq_getweakrefval(global_vm, -1); @@ -74,7 +74,7 @@ ThreadQueue::wakeup() log_warning << "Couldn't wakeup scheduled squirrel VM" << std::endl; } } - + sq_release(global_vm, &object); sq_pop(global_vm, 1); i--; @@ -84,4 +84,3 @@ ThreadQueue::wakeup() } } -