Some lua catchup and cleanup

- add nhl_pcall_handle() to wrap all nhl_pcall calls that didn't check
  return value and either panic() or impossible()
- add --loglua (unix only) to dump Lua memory and steps info to livelog
- remove old logging
- set memory and step limits on all Lua VMs
This commit is contained in:
nhkeni
2023-12-31 12:28:15 -05:00
parent 36e8e504c2
commit c7ab9a0565
17 changed files with 181 additions and 102 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 decl.c $NHDT-Date: 1701132220 2023/11/28 00:43:40 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.304 $ */
/* NetHack 3.7 decl.c $NHDT-Date: 1704043695 2023/12/31 17:28:15 $ $NHDT-Branch: keni-luabits2 $:$NHDT-Revision: 1.309 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2009. */
/* NetHack may be freely redistributed. See license for details. */
@@ -502,6 +502,8 @@ const struct instance_globals_l g_init_l = {
/* nhlua.c */
UNDEFINED_VALUE, /* luacore */
DUMMY, /* lua_warnbuf[] */
0, /* loglua */
0, /* lua_sid */
/* options.c */
FALSE, /* loot_reset_justpicked */
/* save.c */