diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-03-24 12:51:43 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-03-24 13:13:04 +0100 |
| commit | f3fd9c3cd1f2e15e89f9cd96d07c1ba957ae7c89 (patch) | |
| tree | f1b50beb4f82813f2e9d7a48ada332c0f661b744 /text-objects.h | |
| parent | 4c4bd8ef68655f28c11b20bc35ccce0063744c19 (diff) | |
| download | vis-f3fd9c3cd1f2e15e89f9cd96d07c1ba957ae7c89.tar.gz vis-f3fd9c3cd1f2e15e89f9cd96d07c1ba957ae7c89.tar.xz | |
vis-lua: register a panic handler
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.
Diffstat (limited to 'text-objects.h')
0 files changed, 0 insertions, 0 deletions
