com php-src: fix error code upcast on x64: ext/com_dotnet/com _misc.c
| From: | Anatol Belski | Date: | Tue, 28 Oct 2014 16:25:06 +0000 |
| Subject: | com php-src: fix error code upcast on x64: ext/com_dotnet/com _misc.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82746@lists.php.net to get a copy of this message | ||
Commit: e2951a191ef1afea777b865b9c80ac939b603f6b
Author: Anatol Belski <ab@php.net> Tue, 28 Oct 2014 16:52:49 +0100
Parents: 26e7e54e782d8ba80a7f964f0bfcc3a7920349c2
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e2951a191ef1afea777b865b9c80ac939b603f6b
Log:
fix error code upcast on x64
Changed paths:
M ext/com_dotnet/com_misc.c
Diff:
diff --git a/ext/com_dotnet/com_misc.c b/ext/com_dotnet/com_misc.c
index 084a720..f0b21ff 100644
--- a/ext/com_dotnet/com_misc.c
+++ b/ext/com_dotnet/com_misc.c
@@ -36,7 +36,11 @@ void php_com_throw_exception(HRESULT code, char *message TSRMLS_DC)
message = php_win32_error_to_msg(code);
free_msg = 1;
}
+#if SIZEOF_ZEND_LONG == 8
+ zend_throw_exception(php_com_exception_class_entry, message, (zend_long)(uint32_t)code TSRMLS_CC);
+#else
zend_throw_exception(php_com_exception_class_entry, message, (zend_long)code TSRMLS_CC);
+#endif
if (free_msg) {
LocalFree(message);
}