Skip to content

Commit a8c9157

Browse files
committed
Fix ext/tidy
1 parent b704222 commit a8c9157

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/tidy/tests/parsing_file_too_large.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Trying to parse a file that is too large (over 4GB)
44
tidy
55
--SKIPIF--
66
<?php
7-
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
7+
if (PHP_SYS_SIZE < 8) die("skip this test is for 64bit platform only");
88
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
99
if (getenv("SKIP_ASAN")) die("skip too big for asan");
1010
if (getenv("GITHUB_ACTIONS")) die("skip potentially crashes on GitHub actions");

ext/tidy/tidy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ PHP_FUNCTION(tidy_get_config)
12081208
break;
12091209

12101210
case TidyInteger:
1211-
add_assoc_long(return_value, opt_name, (zend_long)opt_value);
1211+
add_assoc_long(return_value, opt_name, (zend_long)(uintptr_t)opt_value);
12121212
break;
12131213

12141214
case TidyBoolean:
@@ -1321,7 +1321,7 @@ PHP_FUNCTION(tidy_getopt)
13211321
RETURN_STR((zend_string*)optval);
13221322

13231323
case TidyInteger:
1324-
RETURN_LONG((zend_long)optval);
1324+
RETURN_LONG((zend_long)(uintptr_t)optval);
13251325
break;
13261326

13271327
case TidyBoolean:

0 commit comments

Comments
 (0)