summaryrefslogtreecommitdiff
path: root/ext/com_dotnet/com_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/com_dotnet/com_misc.c')
-rw-r--r--ext/com_dotnet/com_misc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/com_dotnet/com_misc.c b/ext/com_dotnet/com_misc.c
index 084a720ea1..f0b21ff014 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);
}