aboutsummaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-02-09 18:22:29 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-02-09 18:22:29 -0200
commitd2e340f467a46017fa3526074c1756124e569880 (patch)
treee5b08773a0f0734193b0c1c435fab8ee243f08dc /ldebug.c
parent6875fdc8be9029b1bb29379c59d5409a0df42c10 (diff)
downloadlua-d2e340f467a46017fa3526074c1756124e569880.tar.gz
lua-d2e340f467a46017fa3526074c1756124e569880.tar.bz2
lua-d2e340f467a46017fa3526074c1756124e569880.zip
string pointers are always fully aligned
Diffstat (limited to 'ldebug.c')
-rw-r--r--ldebug.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ldebug.c b/ldebug.c
index 1c9546c4..27a885e9 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.c,v 1.60 2001/02/07 18:13:49 roberto Exp roberto $ 2** $Id: ldebug.c,v 1.61 2001/02/09 18:37:33 roberto Exp roberto $
3** Debug Interface 3** Debug Interface
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -198,7 +198,7 @@ LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n) {
198 198
199 199
200static void infoLproto (lua_Debug *ar, Proto *f) { 200static void infoLproto (lua_Debug *ar, Proto *f) {
201 ar->source = f->source->str; 201 ar->source = getstr(f->source);
202 ar->linedefined = f->lineDefined; 202 ar->linedefined = f->lineDefined;
203 ar->what = "Lua"; 203 ar->what = "Lua";
204} 204}
@@ -249,7 +249,7 @@ static const char *travglobals (lua_State *L, const TObject *o) {
249 for (i=0; i<g->size; i++) { 249 for (i=0; i<g->size; i++) {
250 if (luaO_equalObj(o, val(node(g, i))) && 250 if (luaO_equalObj(o, val(node(g, i))) &&
251 ttype_key(node(g, i)) == LUA_TSTRING) 251 ttype_key(node(g, i)) == LUA_TSTRING)
252 return tsvalue_key(node(g, i))->str; 252 return getstr(tsvalue_key(node(g, i)));
253 } 253 }
254 return NULL; 254 return NULL;
255} 255}
@@ -499,7 +499,7 @@ static const char *getobjname (lua_State *L, StkId obj, const char **name) {
499 lua_assert(pc != -1); 499 lua_assert(pc != -1);
500 switch (GET_OPCODE(i)) { 500 switch (GET_OPCODE(i)) {
501 case OP_GETGLOBAL: { 501 case OP_GETGLOBAL: {
502 *name = p->kstr[GETARG_U(i)]->str; 502 *name = getstr(p->kstr[GETARG_U(i)]);
503 return "global"; 503 return "global";
504 } 504 }
505 case OP_GETLOCAL: { 505 case OP_GETLOCAL: {
@@ -509,7 +509,7 @@ static const char *getobjname (lua_State *L, StkId obj, const char **name) {
509 } 509 }
510 case OP_PUSHSELF: 510 case OP_PUSHSELF:
511 case OP_GETDOTTED: { 511 case OP_GETDOTTED: {
512 *name = p->kstr[GETARG_U(i)]->str; 512 *name = getstr(p->kstr[GETARG_U(i)]);
513 return "field"; 513 return "field";
514 } 514 }
515 default: 515 default: