diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-05-16 14:23:58 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-05-16 14:23:58 -0300 |
| commit | ec79f25286a4ac843280ae7377ec1e5b39a70cea (patch) | |
| tree | 03872cdc5d5f18266021c1cc5d07b214daf59ff3 /opcode.c | |
| parent | 18ea2eff80c720632cb6a89d560c5cce2377df06 (diff) | |
| download | lua-ec79f25286a4ac843280ae7377ec1e5b39a70cea.tar.gz lua-ec79f25286a4ac843280ae7377ec1e5b39a70cea.tar.bz2 lua-ec79f25286a4ac843280ae7377ec1e5b39a70cea.zip | |
new lua function "getstack"; new interface to function luaI_reportbug.
Diffstat (limited to '')
| -rw-r--r-- | opcode.c | 8 |
1 files changed, 2 insertions, 6 deletions
| @@ -3,7 +3,7 @@ | |||
| 3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | char *rcs_opcode="$Id: opcode.c,v 3.36 1995/04/11 17:56:30 celes Exp roberto $"; | 6 | char *rcs_opcode="$Id: opcode.c,v 3.37 1995/05/02 18:43:03 roberto Exp roberto $"; |
| 7 | 7 | ||
| 8 | #include <setjmp.h> | 8 | #include <setjmp.h> |
| 9 | #include <stdlib.h> | 9 | #include <stdlib.h> |
| @@ -68,14 +68,10 @@ Object *luaI_Address (lua_Object o) | |||
| 68 | ** Error messages | 68 | ** Error messages |
| 69 | */ | 69 | */ |
| 70 | 70 | ||
| 71 | #define MAXMESSAGE MAXFUNCSTACK*80 | ||
| 72 | 71 | ||
| 73 | static void lua_message (char *s) | 72 | static void lua_message (char *s) |
| 74 | { | 73 | { |
| 75 | char msg[MAXMESSAGE]; | 74 | luaI_reportbug(s, 1); |
| 76 | strcpy (msg, s); | ||
| 77 | luaI_reportbug(msg, MAXMESSAGE-strlen(s)); | ||
| 78 | lua_pushstring(msg); | ||
| 79 | do_call(&luaI_fallBacks[FB_ERROR].function, (top-stack)-1, 0, (top-stack)-1); | 75 | do_call(&luaI_fallBacks[FB_ERROR].function, (top-stack)-1, 0, (top-stack)-1); |
| 80 | } | 76 | } |
| 81 | 77 | ||
