X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fcalc%2Funary.h;h=263c7c31c7fed3f851b571be169059043f9fb422;hb=HEAD;hp=72a82e1f2ac80e64c0b51da947127cb62fb2d604;hpb=c9384515a81cb64d345b299908b2852f51bb8e6e;p=m6w6%2Fext-psi diff --git a/src/calc/unary.h b/src/calc/unary.h index 72a82e1..263c7c3 100644 --- a/src/calc/unary.h +++ b/src/calc/unary.h @@ -23,7 +23,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ -#include "php_psi_stdinc.h" #include #include "token.h" @@ -57,12 +56,18 @@ static inline token_t psi_calc_minus(token_t t1, impl_val *v1, token_t t2, impl_ case PSI_T_UINT64: res->u64 = -v1->u64; break; +#if HAVE_INT128 case PSI_T_INT128: res->i128 = -v1->i128; break; +#endif + +#if HAVE_UINT128 case PSI_T_UINT128: res->u128 = -v1->u128; break; +#endif + case PSI_T_FLOAT: res->fval = -v1->fval; break; @@ -113,12 +118,18 @@ static inline token_t psi_calc_bool_not(token_t t1, impl_val *v1, token_t t2, im case PSI_T_UINT64: res->u8 = !v1->u64; break; +#if HAVE_INT128 case PSI_T_INT128: res->u8 = !v1->i128; break; +#endif + +#if HAVE_UINT128 case PSI_T_UINT128: res->u8 = !v1->u128; break; +#endif + case PSI_T_FLOAT: res->u8 = !v1->fval; break; @@ -179,14 +190,20 @@ static inline token_t psi_calc_bin_not(token_t t1, impl_val *v1, token_t t2, imp i1.u64 = v1->u64; break; +#if HAVE_INT128 case PSI_T_INT128: i1.u64 = v1->i128; break; +#endif + +#if HAVE_UINT128 case PSI_T_UINT128: i1.u64 = v1->u128; break; +#endif + case PSI_T_FLOAT: i1.u64 = v1->fval; break;