diff options
| author | sanine <sanine.not@pm.me> | 2023-03-11 15:58:20 -0600 | 
|---|---|---|
| committer | sanine <sanine.not@pm.me> | 2023-03-11 15:58:20 -0600 | 
| commit | ebc50b387ab209c9f9a0d92e340ac293d5697274 (patch) | |
| tree | ea8c8b3677a18c994d2b9d33dbef3461dcf18113 /libs/luajit-cmake/luajit/src/lj_assert.c | |
| parent | c2329b4c8258baa9429c77566c9def97d00e96d7 (diff) | |
build & link with luajit instead of lua5.1
Diffstat (limited to 'libs/luajit-cmake/luajit/src/lj_assert.c')
| -rw-r--r-- | libs/luajit-cmake/luajit/src/lj_assert.c | 28 | 
1 files changed, 28 insertions, 0 deletions
| diff --git a/libs/luajit-cmake/luajit/src/lj_assert.c b/libs/luajit-cmake/luajit/src/lj_assert.c new file mode 100644 index 0000000..4b713b2 --- /dev/null +++ b/libs/luajit-cmake/luajit/src/lj_assert.c @@ -0,0 +1,28 @@ +/* +** Internal assertions. +** Copyright (C) 2005-2022 Mike Pall. See Copyright Notice in luajit.h +*/ + +#define lj_assert_c +#define LUA_CORE + +#if defined(LUA_USE_ASSERT) || defined(LUA_USE_APICHECK) + +#include <stdio.h> + +#include "lj_obj.h" + +void lj_assert_fail(global_State *g, const char *file, int line, +		    const char *func, const char *fmt, ...) +{ +  va_list argp; +  va_start(argp, fmt); +  fprintf(stderr, "LuaJIT ASSERT %s:%d: %s: ", file, line, func); +  vfprintf(stderr, fmt, argp); +  fputc('\n', stderr); +  va_end(argp); +  UNUSED(g);  /* May be NULL. TODO: optionally dump state. */ +  abort(); +} + +#endif | 
