diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-12-23 17:24:19 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-12-23 17:24:19 -0200 |
commit | 541e722360168c78a61b8b79f4cd234252ffb6cb (patch) | |
tree | f80a9749f7acd50ee2806bc592140a6e5e97376a | |
parent | 807ba6301c949cb42bd9390d737938c51dd5784c (diff) | |
download | lua-541e722360168c78a61b8b79f4cd234252ffb6cb.tar.gz lua-541e722360168c78a61b8b79f4cd234252ffb6cb.tar.bz2 lua-541e722360168c78a61b8b79f4cd234252ffb6cb.zip |
details
-rw-r--r-- | lobject.h | 8 | ||||
-rw-r--r-- | lua.stx | 4 | ||||
-rw-r--r-- | lvm.c | 6 |
3 files changed, 12 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 1.10 1997/11/27 18:25:06 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 1.11 1997/12/15 16:17:20 roberto Exp roberto $ |
3 | ** Type definitions for Lua objects | 3 | ** Type definitions for Lua objects |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -13,10 +13,16 @@ | |||
13 | 13 | ||
14 | #include <limits.h> | 14 | #include <limits.h> |
15 | 15 | ||
16 | |||
17 | /* | ||
18 | ** "real" is the type "number" of Lua | ||
19 | ** GREP LUA_NUMBER to change that | ||
20 | */ | ||
16 | #ifndef real | 21 | #ifndef real |
17 | #define real float | 22 | #define real float |
18 | #endif | 23 | #endif |
19 | 24 | ||
25 | |||
20 | #define Byte lua_Byte /* some systems have Byte as a predefined type */ | 26 | #define Byte lua_Byte /* some systems have Byte as a predefined type */ |
21 | typedef unsigned char Byte; /* unsigned 8 bits */ | 27 | typedef unsigned char Byte; /* unsigned 8 bits */ |
22 | 28 | ||
@@ -1,6 +1,6 @@ | |||
1 | %{ | 1 | %{ |
2 | /* | 2 | /* |
3 | ** $Id: lua.stx,v 1.24 1997/12/22 17:24:11 roberto Exp roberto $ | 3 | ** $Id: lua.stx,v 1.25 1997/12/22 20:57:18 roberto Exp roberto $ |
4 | ** Syntax analizer and code generator | 4 | ** Syntax analizer and code generator |
5 | ** See Copyright Notice in lua.h | 5 | ** See Copyright Notice in lua.h |
6 | */ | 6 | */ |
@@ -95,7 +95,7 @@ void luaY_syntaxerror (char *s, char *token) | |||
95 | { | 95 | { |
96 | if (token[0] == 0) | 96 | if (token[0] == 0) |
97 | token = "<eof>"; | 97 | token = "<eof>"; |
98 | luaL_verror("%.100s;\n> last token read: \"%.50s\" at line %d in file %.50s", | 98 | luaL_verror("%.100s;\n last token read: \"%.50s\" at line %d in file %.50s", |
99 | s, token, L->lexstate->linenumber, L->mainState->f->fileName->str); | 99 | s, token, L->lexstate->linenumber, L->mainState->f->fileName->str); |
100 | } | 100 | } |
101 | 101 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 1.17 1997/12/15 16:17:20 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.18 1997/12/17 20:48:58 roberto Exp roberto $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -43,7 +43,7 @@ static TaggedString *strconc (char *l, char *r) | |||
43 | 43 | ||
44 | 44 | ||
45 | int luaV_tonumber (TObject *obj) | 45 | int luaV_tonumber (TObject *obj) |
46 | { | 46 | { /* LUA_NUMBER */ |
47 | double t; | 47 | double t; |
48 | char c; | 48 | char c; |
49 | if (ttype(obj) != LUA_T_STRING) | 49 | if (ttype(obj) != LUA_T_STRING) |
@@ -59,7 +59,7 @@ int luaV_tonumber (TObject *obj) | |||
59 | 59 | ||
60 | 60 | ||
61 | int luaV_tostring (TObject *obj) | 61 | int luaV_tostring (TObject *obj) |
62 | { | 62 | { /* LUA_NUMBER */ |
63 | if (ttype(obj) != LUA_T_NUMBER) | 63 | if (ttype(obj) != LUA_T_NUMBER) |
64 | return 1; | 64 | return 1; |
65 | else { | 65 | else { |