Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The intention here is to catch any errors in unprotected mode, close the lua state and jump back to the mainloop to give the user the opportunity to take care of unsaved changes. We abuse the infrastructure Lua provides for custom memory allocators to associate our vis instance pointer with the lua state. In the panic handler we can then use lua_getallocf to get our context back. The actual memory allocater is equivalent to the one used by default and just forwards everything to the libc.
- Loading branch information