diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-12-05 14:27:58 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-12-05 14:27:58 -0300 |
commit | bb93f04d87cfc093757dc712905e1fe3fbe65f58 (patch) | |
tree | 14f154ea303b10d543266b1e36ad8fb441695a66 /lobject.h | |
parent | 975d4e0592f980aef09c432302496d834249b6a7 (diff) | |
download | lua-bb93f04d87cfc093757dc712905e1fe3fbe65f58.tar.gz lua-bb93f04d87cfc093757dc712905e1fe3fbe65f58.tar.bz2 lua-bb93f04d87cfc093757dc712905e1fe3fbe65f58.zip |
Refactoring of 'luaH_newkey'
Function broke in two and some checks moved to the caller. (We may
want to call it without the checks.)
Diffstat (limited to 'lobject.h')
-rw-r--r-- | lobject.h | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -750,10 +750,9 @@ typedef union Node { | |||
750 | 750 | ||
751 | 751 | ||
752 | /* copy a value into a key */ | 752 | /* copy a value into a key */ |
753 | #define setnodekey(L,node,obj) \ | 753 | #define setnodekey(node,obj) \ |
754 | { Node *n_=(node); const TValue *io_=(obj); \ | 754 | { Node *n_=(node); const TValue *io_=(obj); \ |
755 | n_->u.key_val = io_->value_; n_->u.key_tt = io_->tt_; \ | 755 | n_->u.key_val = io_->value_; n_->u.key_tt = io_->tt_; } |
756 | checkliveness(L,io_); } | ||
757 | 756 | ||
758 | 757 | ||
759 | /* copy a value from a key */ | 758 | /* copy a value from a key */ |