diff options
-rw-r--r-- | ldo.c | 3 | ||||
-rw-r--r-- | manual/manual.of | 2 |
2 files changed, 3 insertions, 2 deletions
@@ -388,9 +388,10 @@ static void rethook (lua_State *L, CallInfo *ci, int nres) { | |||
388 | ** an error if there is no '__call' metafield. | 388 | ** an error if there is no '__call' metafield. |
389 | */ | 389 | */ |
390 | StkId luaD_tryfuncTM (lua_State *L, StkId func) { | 390 | StkId luaD_tryfuncTM (lua_State *L, StkId func) { |
391 | const TValue *tm = luaT_gettmbyobj(L, s2v(func), TM_CALL); | 391 | const TValue *tm; |
392 | StkId p; | 392 | StkId p; |
393 | checkstackGCp(L, 1, func); /* space for metamethod */ | 393 | checkstackGCp(L, 1, func); /* space for metamethod */ |
394 | tm = luaT_gettmbyobj(L, s2v(func), TM_CALL); /* (after previous GC) */ | ||
394 | if (l_unlikely(ttisnil(tm))) | 395 | if (l_unlikely(ttisnil(tm))) |
395 | luaG_callerror(L, s2v(func)); /* nothing to call */ | 396 | luaG_callerror(L, s2v(func)); /* nothing to call */ |
396 | for (p = L->top; p > func; p--) /* open space for metamethod */ | 397 | for (p = L->top; p > func; p--) /* open space for metamethod */ |
diff --git a/manual/manual.of b/manual/manual.of index 9e0b8835..c9e62b49 100644 --- a/manual/manual.of +++ b/manual/manual.of | |||
@@ -6247,7 +6247,7 @@ to its caller. | |||
6247 | } | 6247 | } |
6248 | 6248 | ||
6249 | @LibEntry{error (message [, level])| | 6249 | @LibEntry{error (message [, level])| |
6250 | Raises an error @see{error} with @{message} as the error object. | 6250 | Raises an error @see{error} with @id{message} as the error object. |
6251 | This function never returns. | 6251 | This function never returns. |
6252 | 6252 | ||
6253 | Usually, @id{error} adds some information about the error position | 6253 | Usually, @id{error} adds some information about the error position |