diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-11-01 10:47:45 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-11-01 10:47:45 -0200 |
commit | d106f3f43c147b872df7b3304b2e42e92bc1b7bf (patch) | |
tree | cd8e6a0896d25aef59dbdfc30cd24503cda6cf04 | |
parent | bf3091d94f4043513168fc3317f3cb9179e24861 (diff) | |
download | lua-d106f3f43c147b872df7b3304b2e42e92bc1b7bf.tar.gz lua-d106f3f43c147b872df7b3304b2e42e92bc1b7bf.tar.bz2 lua-d106f3f43c147b872df7b3304b2e42e92bc1b7bf.zip |
pre-defined variable _VERSION_
-rw-r--r-- | table.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** Module to control static tables | 3 | ** Module to control static tables |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_table="$Id: table.c,v 2.56 1996/06/18 21:12:23 roberto Exp roberto $"; | 6 | char *rcs_table="$Id: table.c,v 2.57 1996/07/12 20:00:26 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include "mem.h" | 8 | #include "mem.h" |
9 | #include "opcode.h" | 9 | #include "opcode.h" |
@@ -60,13 +60,16 @@ static struct { | |||
60 | void luaI_initsymbol (void) | 60 | void luaI_initsymbol (void) |
61 | { | 61 | { |
62 | int i; | 62 | int i; |
63 | Word n; | ||
63 | lua_maxsymbol = BUFFER_BLOCK; | 64 | lua_maxsymbol = BUFFER_BLOCK; |
64 | lua_table = newvector(lua_maxsymbol, Symbol); | 65 | lua_table = newvector(lua_maxsymbol, Symbol); |
65 | for (i=0; i<INTFUNCSIZE; i++) | 66 | for (i=0; i<INTFUNCSIZE; i++) |
66 | { | 67 | { |
67 | Word n = luaI_findsymbolbyname(int_funcs[i].name); | 68 | n = luaI_findsymbolbyname(int_funcs[i].name); |
68 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = int_funcs[i].func; | 69 | s_tag(n) = LUA_T_CFUNCTION; s_fvalue(n) = int_funcs[i].func; |
69 | } | 70 | } |
71 | n = luaI_findsymbolbyname("_VERSION_"); | ||
72 | s_tag(n) = LUA_T_STRING; s_tsvalue(n) = lua_createstring(LUA_VERSION); | ||
70 | } | 73 | } |
71 | 74 | ||
72 | 75 | ||