From: inem0o Date: Sun, 11 Aug 2019 15:35:33 +0000 (+0200) Subject: Add crc32 stub X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1376f61aed2b85b8f7186fb001c9acb281c6fc03;p=php Add crc32 stub --- diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index d1ac708795..958c7ad590 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -766,12 +766,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_get_browser, 0, 0, 0) ZEND_ARG_INFO(0, browser_name) ZEND_ARG_INFO(0, return_array) ZEND_END_ARG_INFO() -/* }}} */ -/* {{{ crc32.c */ -ZEND_BEGIN_ARG_INFO(arginfo_crc32, 0) - ZEND_ARG_INFO(0, str) -ZEND_END_ARG_INFO() - /* }}} */ /* {{{ crypt.c */ ZEND_BEGIN_ARG_INFO_EX(arginfo_crypt, 0, 0, 1) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index ba7300e198..90424b454d 100644 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -66,3 +66,7 @@ function base64_encode(string $str): string {} /** @return string|false */ function base64_decode(string $str, bool $strict = false) {} + +/* crc32.c */ + +function crc32(string $str): int {} \ No newline at end of file diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 23b2dce733..5fcdec3992 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -78,3 +78,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_base64_decode, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, strict, _IS_BOOL, 0) ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_crc32, 0, 1, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) +ZEND_END_ARG_INFO()