Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2013
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.29 KB | None | 0 0
  1. if not platform.withGC then
  2.     function platform.withGC(f)
  3.         local gc = platform.gc()
  4.         gc:begin()
  5.         local result = {f(gc)}
  6.         gc:finish()
  7.         return unpack(result)
  8.     end
  9. end
  10.  
  11. -- http://inspired-lua.org/index.php/2013/05/how-to-add-your-own-functions-to-gc/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement