From ba32a85db3f1130d01ccf228e253d2e717c53c70 Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Thu, 5 Feb 2015 21:02:10 +0100 Subject: always cast constants to 64bit --- zend/constantimpl.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'zend') diff --git a/zend/constantimpl.h b/zend/constantimpl.h index 1fb1676..46a16d2 100644 --- a/zend/constantimpl.h +++ b/zend/constantimpl.h @@ -127,13 +127,9 @@ public: break; case IS_LONG: -#ifdef PHPCPP_32BIT - // 32bit systems find this difficult - clss.property(_name, (int32_t)Z_LVAL(_constant.value), Php::Const); -#else - // set a long constant - clss.property(_name, Z_LVAL(_constant.value), Php::Const); -#endif + // set a long constant (cast is necessary because php uses longs, which + // have a different size on different platforms) + clss.property(_name, (int64_t)Z_LVAL(_constant.value), Php::Const); break; case IS_DOUBLE: -- cgit v1.2.3