Skip to content
Snippets Groups Projects
Commit e3b24fe2 authored by Oleg Babin's avatar Oleg Babin Committed by Vladimir Davydov
Browse files

fiber: correctly initialize storage_ref value

Before this patch we used an assumption in lua fiber code that
all valid lua refs are positive numbers. However there are
special constants defined in lua header for such purpose LUA_NOREF
and LUA_REFNIL [1]. This patch introduces special value in fiber
module that is equal to LUA_REFNIL to be sure that this value will
be correct in future static assert is added.

Also this patch introduces several usages of this value - let's
make fiber code more clearer and start to initialize ref values
with LUA_NOREF value. Also it will be needed for future changes.

  [1] https://pgl.yoyo.org/luai/i/luaL_ref
parent fa30d9db
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment