[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: PATCH: Add Type Checking in op_bitwiseK
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 21 Apr 2021 10:49:24 -0300
> This is a small patch for the macro op_bitwiseK in ./src/lvm.c (Lua 5.4.3).
> This patch adds the type checking against K operand in op_bitwiseK as in op_arithK.
> I wonder how much important the type checking against K operands is.
> Please tell me if you have any opinion about this patch.
As the comments in 'lopcodes.h' indicate, the compiler ensures that
these constants are always integers. (Your patch assumes they are always
numbers).
-- Roberto