diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2015-02-05 21:02:10 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2015-02-05 21:02:10 +0100 |
commit | ba32a85db3f1130d01ccf228e253d2e717c53c70 (patch) | |
tree | b1c5424ad98df8f5979da201079e0a7ab4cb4a65 | |
parent | 1432d5f4bb053fcaa12a9b7e50c4d3787eb5194b (diff) |
always cast constants to 64bit
-rw-r--r-- | zend/constantimpl.h | 10 |
1 files changed, 3 insertions, 7 deletions
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: |