[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: lua_pushcfunction (lua 5.3) seems to be able to throw error, contrary to docs
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 5 Dec 2017 11:03:05 -0200
> I may be misreading this, but:
> 5.3 docs say that lua_pushcfunction cannot throw error (it's tagged with
> [-0, +1, -]).
> But reading the code, it seems to be able to throw an error on this
> lua_pushcfunction (macro)
> calls lua_pushcclosure with n==0
> calls luaC_checkGC (even when n==0)
> This looks like a problem in the code to me: wouldn't it make more sense
> to put the luaC_checkGC call in lua_pushcclosure inside the else
Sure. This is a bug. Thanks for the report.