aboutsummaryrefslogtreecommitdiff
path: root/lobject.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-03-10 15:37:44 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-03-10 15:37:44 -0300
commit73aa465a8ed8dee6c6a27a6f8b2f51227b70789d (patch)
tree496a63ffffe0312f1d0b9882d97944fa38ed7801 /lobject.c
parent3d0577f4b98908be3f2d697ab75c5fbbd3f6999b (diff)
downloadlua-73aa465a8ed8dee6c6a27a6f8b2f51227b70789d.tar.gz
lua-73aa465a8ed8dee6c6a27a6f8b2f51227b70789d.tar.bz2
lua-73aa465a8ed8dee6c6a27a6f8b2f51227b70789d.zip
some name changes
Diffstat (limited to 'lobject.c')
-rw-r--r--lobject.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/lobject.c b/lobject.c
index 617815d8..1fdb7c80 100644
--- a/lobject.c
+++ b/lobject.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.c,v 1.31 2000/02/17 18:30:36 roberto Exp roberto $ 2** $Id: lobject.c,v 1.32 2000/03/03 14:58:26 roberto Exp roberto $
3** Some generic functions over Lua objects 3** Some generic functions over Lua objects
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -20,7 +20,7 @@ const char *const luaO_typenames[] = { /* ORDER LUA_T */
20}; 20};
21 21
22 22
23const TObject luaO_nilobject = {LUA_T_NIL, {NULL}}; 23const TObject luaO_nilobject = {TAG_NIL, {NULL}};
24 24
25 25
26/* 26/*
@@ -35,19 +35,19 @@ unsigned long luaO_power2 (unsigned long n) {
35 35
36int luaO_equalval (const TObject *t1, const TObject *t2) { 36int luaO_equalval (const TObject *t1, const TObject *t2) {
37 switch (ttype(t1)) { 37 switch (ttype(t1)) {
38 case LUA_T_NIL: 38 case TAG_NIL:
39 return 1; 39 return 1;
40 case LUA_T_NUMBER: 40 case TAG_NUMBER:
41 return nvalue(t1) == nvalue(t2); 41 return nvalue(t1) == nvalue(t2);
42 case LUA_T_STRING: case LUA_T_USERDATA: 42 case TAG_STRING: case TAG_USERDATA:
43 return svalue(t1) == svalue(t2); 43 return svalue(t1) == svalue(t2);
44 case LUA_T_ARRAY: 44 case TAG_ARRAY:
45 return avalue(t1) == avalue(t2); 45 return avalue(t1) == avalue(t2);
46 case LUA_T_LPROTO: 46 case TAG_LPROTO:
47 return tfvalue(t1) == tfvalue(t2); 47 return tfvalue(t1) == tfvalue(t2);
48 case LUA_T_CPROTO: 48 case TAG_CPROTO:
49 return fvalue(t1) == fvalue(t2); 49 return fvalue(t1) == fvalue(t2);
50 case LUA_T_CCLOSURE: case LUA_T_LCLOSURE: 50 case TAG_CCLOSURE: case TAG_LCLOSURE:
51 return t1->value.cl == t2->value.cl; 51 return t1->value.cl == t2->value.cl;
52 default: 52 default:
53 LUA_INTERNALERROR(L, "invalid type"); 53 LUA_INTERNALERROR(L, "invalid type");
@@ -67,7 +67,7 @@ static double expten (unsigned int e) {
67} 67}
68 68
69 69
70int luaO_str2d (const char *s, real *result) { /* LUA_NUMBER */ 70int luaO_str2d (const char *s, Number *result) { /* LUA_NUMBER */
71 double a = 0.0; 71 double a = 0.0;
72 int point = 0; /* number of decimal digits */ 72 int point = 0; /* number of decimal digits */
73 int sig; 73 int sig;