/////////////////////////////////////////////////////////////////////
| 193 | |
| 194 | ////////////////////////////////////////////////////////////////////////// |
| 195 | void DumpCallStack(lua_State* L) |
| 196 | { |
| 197 | lua_Debug ar; |
| 198 | |
| 199 | memset(&ar, 0, sizeof(lua_Debug)); |
| 200 | |
| 201 | ////////////////////////////////////////////////////////////////////////// |
| 202 | // Print callstack. |
| 203 | ////////////////////////////////////////////////////////////////////////// |
| 204 | int level = 0; |
| 205 | while (lua_getstack(L, level++, &ar)) |
| 206 | { |
| 207 | const char* slevel = ""; |
| 208 | if (level == 1) |
| 209 | slevel = " "; |
| 210 | int nRes = lua_getinfo(L, "lnS", &ar); |
| 211 | if (ar.name) |
| 212 | CryLog("$6%s > %s, (%s: %d)", slevel, ar.name, ar.short_src, ar.currentline); |
| 213 | else |
| 214 | CryLog("$6%s > (null) (%s: %d)", slevel, ar.short_src, ar.currentline); |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | void* custom_lua_alloc(void* ud, void* ptr, size_t osize, size_t nsize) |
| 219 | { |
no test coverage detected