Change in the handling of 'L->top' when calling metamethods

Instead of updating 'L->top' in every place that may call a
metamethod, the metamethod functions themselves (luaT_trybinTM and
luaT_callorderTM) correct the top. (When calling metamethods from
the C API, however, the callers must preserve 'L->top'.)
This commit is contained in:
Roberto Ierusalimschy
2019-07-26 14:59:39 -03:00
parent e70f275f32
commit b80077b8f3
10 changed files with 75 additions and 29 deletions

View File

@@ -809,7 +809,7 @@ assert(run(function ()
-- tests for coroutine API
if T==nil then
(Message or print)('\n >>> testC not active: skipping coroutine API tests <<<\n')
return
print "OK"; return
end
print('testing coroutine API')