aboutsummaryrefslogtreecommitdiff
path: root/lobject.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-07-18 15:31:22 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-07-18 15:31:22 -0300
commit3c1d415bd3fef686b27f853bdf3eaf1f0a9bb0be (patch)
treee12a3f99a83e6a298f46f4bdaedebd0755543181 /lobject.h
parentd36a31e6739bcd39c84f637344227af87cfd0ee5 (diff)
downloadlua-3c1d415bd3fef686b27f853bdf3eaf1f0a9bb0be.tar.gz
lua-3c1d415bd3fef686b27f853bdf3eaf1f0a9bb0be.tar.bz2
lua-3c1d415bd3fef686b27f853bdf3eaf1f0a9bb0be.zip
Details
- Macro 'checkliveness' (for debug) always uses 'L', to avoid warnings. - Some old 'while' changed to 'for' in 'testes/gc.lua'. - In 'testes/libs/makefile', do not make files depend on 'ltests.h', which may not even exist.
Diffstat (limited to 'lobject.h')
-rw-r--r--lobject.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/lobject.h b/lobject.h
index 95f8e188..f21e8a91 100644
--- a/lobject.h
+++ b/lobject.h
@@ -89,8 +89,8 @@ typedef struct TValue {
89#define righttt(obj) (ttypetag(obj) == gcvalue(obj)->tt) 89#define righttt(obj) (ttypetag(obj) == gcvalue(obj)->tt)
90 90
91#define checkliveness(L,obj) \ 91#define checkliveness(L,obj) \
92 lua_longassert(!iscollectable(obj) || \ 92 ((void)L, lua_longassert(!iscollectable(obj) || \
93 (righttt(obj) && (L == NULL || !isdead(G(L),gcvalue(obj))))) 93 (righttt(obj) && (L == NULL || !isdead(G(L),gcvalue(obj))))))
94 94
95 95
96/* Macros to set values */ 96/* Macros to set values */
@@ -100,7 +100,7 @@ typedef struct TValue {
100#define setobj(L,obj1,obj2) \ 100#define setobj(L,obj1,obj2) \
101 { TValue *io1=(obj1); const TValue *io2=(obj2); \ 101 { TValue *io1=(obj1); const TValue *io2=(obj2); \
102 io1->value_ = io2->value_; io1->tt_ = io2->tt_; \ 102 io1->value_ = io2->value_; io1->tt_ = io2->tt_; \
103 (void)L; checkliveness(L,io1); lua_assert(!isreallyempty(io1)); } 103 checkliveness(L,io1); lua_assert(!isreallyempty(io1)); }
104 104
105/* 105/*
106** different types of assignments, according to destination 106** different types of assignments, according to destination
@@ -651,14 +651,14 @@ typedef union Node {
651#define setnodekey(L,node,obj) \ 651#define setnodekey(L,node,obj) \
652 { Node *n_=(node); const TValue *io_=(obj); \ 652 { Node *n_=(node); const TValue *io_=(obj); \
653 n_->u.key_val = io_->value_; n_->u.key_tt = io_->tt_; \ 653 n_->u.key_val = io_->value_; n_->u.key_tt = io_->tt_; \
654 (void)L; checkliveness(L,io_); } 654 checkliveness(L,io_); }
655 655
656 656
657/* copy a value from a key */ 657/* copy a value from a key */
658#define getnodekey(L,obj,node) \ 658#define getnodekey(L,obj,node) \
659 { TValue *io_=(obj); const Node *n_=(node); \ 659 { TValue *io_=(obj); const Node *n_=(node); \
660 io_->value_ = n_->u.key_val; io_->tt_ = n_->u.key_tt; \ 660 io_->value_ = n_->u.key_val; io_->tt_ = n_->u.key_tt; \
661 (void)L; checkliveness(L,io_); } 661 checkliveness(L,io_); }
662 662
663 663
664/* 664/*