aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lauxlib.c b/lauxlib.c
index b6903013..831d3e34 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -21,6 +21,18 @@
21#include "lualib.h" 21#include "lualib.h"
22 22
23 23
24LUALIB_API const char *luaL_errstr (int errcode) {
25 static const char *const errstr[] = {
26 "ok",
27 "run-time error",
28 "cannot open file",
29 "syntax error",
30 "memory allocation error",
31 "error in error handling"
32 };
33 return errstr[errcode];
34}
35
24 36
25LUALIB_API int luaL_findstring (const char *name, const char *const list[]) { 37LUALIB_API int luaL_findstring (const char *name, const char *const list[]) {
26 int i; 38 int i;