summaryrefslogtreecommitdiff
path: root/lvm.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2022-09-23 11:08:10 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2022-09-23 11:08:10 -0300
commit26be27459b11feabed52cf40aaa76f86c7edc977 (patch)
tree9f3cd8be898991a52f6b5f8b140a12b8b9acb51d /lvm.h
parentcfbe378f906061ee56f91acfbdf569d0d3fb9556 (diff)
downloadlua-github-26be27459b11feabed52cf40aaa76f86c7edc977.tar.gz
Negation in constant folding of '>>' may overflow
Diffstat (limited to 'lvm.h')
-rw-r--r--lvm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lvm.h b/lvm.h
index 1bc16f3a..dba1ad27 100644
--- a/lvm.h
+++ b/lvm.h
@@ -110,6 +110,11 @@ typedef enum {
luaC_barrierback(L, gcvalue(t), v); }
+/*
+** Shift right is the same as shift left with a negative 'y'
+*/
+#define luaV_shiftr(x,y) luaV_shiftl(x,intop(-, 0, y))
+
LUAI_FUNC int luaV_equalobj (lua_State *L, const TValue *t1, const TValue *t2);