diff options
| author | ame <[email protected]> | 2026-06-30 04:30:10 -0500 |
|---|---|---|
| committer | ame <[email protected]> | 2026-06-30 04:30:10 -0500 |
| commit | 7f96376ffdd63397a4265975ec4018c4465094f9 (patch) | |
| tree | 28c1c9fc949f08d6828dc5d86604931bb741a4dc /src/lua.h | |
| parent | fb6a20845fed68f1fc3bb5722bb1f5f7f9469d95 (diff) | |
table.contains and some check safteystate-copy-changes
Diffstat (limited to 'src/lua.h')
| -rw-r--r-- | src/lua.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -115,6 +115,13 @@ extern int _print_errors; sprintf(err, "(%s:%i) %s assertion failed", file, line, #eq);\
luaI_error(L, -1, err);}}
+#define luaI_assert2(L, eq){_helperluaI_assert2(L, eq, __FILE__, __LINE__);}
+#define _helperluaI_assert2(L, eq, file, line){\
+ if(!(eq)){\
+ char err[1024] = {0};\
+ sprintf(err, "(%s:%i) %s assertion failed", file, line, #eq);\
+ luaL_error(L, err);}}
+
int writer(lua_State*, const void*, size_t, void*);
#if LUA_VERSION_NUM != 501
|
