diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-09-14 11:09:31 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-09-14 11:09:31 -0300 |
commit | 620d22f2a09ccfe5b7a09ebc11a7b5dca28ac9e4 (patch) | |
tree | e0a789478ca78f601d4fc05b62feddb978914a65 /lstrlib.c | |
parent | f45cba42b5c32758337f62c56e98fdb85a9f4af2 (diff) | |
download | lua-620d22f2a09ccfe5b7a09ebc11a7b5dca28ac9e4.tar.gz lua-620d22f2a09ccfe5b7a09ebc11a7b5dca28ac9e4.tar.bz2 lua-620d22f2a09ccfe5b7a09ebc11a7b5dca28ac9e4.zip |
new API function lua_rawget
Diffstat (limited to 'lstrlib.c')
-rw-r--r-- | lstrlib.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstrlib.c,v 1.51 2000/09/05 19:33:32 roberto Exp $ | 2 | ** $Id: lstrlib.c,v 1.52 2000/09/11 17:38:42 roberto Exp roberto $ |
3 | ** Standard library for string operations and pattern-matching | 3 | ** Standard library for string operations and pattern-matching |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -457,13 +457,10 @@ static void add_s (lua_State *L, luaL_Buffer *b, struct Capture *cap) { | |||
457 | } | 457 | } |
458 | } | 458 | } |
459 | else { /* is a function */ | 459 | else { /* is a function */ |
460 | int status; | ||
461 | int n; | 460 | int n; |
462 | lua_pushvalue(L, 3); | 461 | lua_pushvalue(L, 3); |
463 | n = push_captures(L, cap); | 462 | n = push_captures(L, cap); |
464 | status = lua_call(L, n, 1); | 463 | lua_rawcall(L, n, 1); |
465 | if (status != 0) | ||
466 | lua_error(L, NULL); /* propagate error */ | ||
467 | if (lua_isstring(L, -1)) | 464 | if (lua_isstring(L, -1)) |
468 | luaL_addvalue(b); /* add return to accumulated result */ | 465 | luaL_addvalue(b); /* add return to accumulated result */ |
469 | else | 466 | else |