diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-02-07 18:24:46 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-02-07 18:25:24 +0100 |
commit | 1d9e80a53d84910acbde81715dbde9aef3320c47 (patch) | |
tree | 5fc5a3b24caecca77a327887756231d7c7e9f823 | |
parent | 4bdc4da1c7c8f078531a2ab77ba5218c9dd25b5e (diff) | |
download | php-git-1d9e80a53d84910acbde81715dbde9aef3320c47.tar.gz |
Simplify COM_ERR_CONST definition for x64
This is also a wee bit faster.
-rw-r--r-- | ext/com_dotnet/com_extension.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/com_dotnet/com_extension.c b/ext/com_dotnet/com_extension.c index e791cb0126..1353f48cb4 100644 --- a/ext/com_dotnet/com_extension.c +++ b/ext/com_dotnet/com_extension.c @@ -246,11 +246,7 @@ PHP_MINIT_FUNCTION(com_dotnet) #define COM_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_CS|CONST_PERSISTENT) #if SIZEOF_ZEND_LONG == 8 -# define COM_ERR_CONST(x) { \ - zend_long __tmp; \ - ULongToIntPtr(x, &__tmp); \ - REGISTER_LONG_CONSTANT(#x, __tmp, CONST_CS|CONST_PERSISTENT); \ -} +# define COM_ERR_CONST(x) REGISTER_LONG_CONSTANT(#x, (zend_long) (ULONG) (x), CONST_CS|CONST_PERSISTENT) #else # define COM_ERR_CONST COM_CONST #endif |