From: inem0o Date: Mon, 19 Aug 2019 10:08:24 +0000 (+0200) Subject: Add sha1 arginfo stubs X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=baeb10d736f45a1ab84df78e65483f732f4fbbca;p=php Add sha1 arginfo stubs --- diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index e9749b5e91..19bb038bf0 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -1695,17 +1695,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_random_int, 0, 0, 2) ZEND_ARG_INFO(0, max) ZEND_END_ARG_INFO() /* }}} */ -/* {{{ sha1.c */ -ZEND_BEGIN_ARG_INFO_EX(arginfo_sha1, 0, 0, 1) - ZEND_ARG_INFO(0, str) - ZEND_ARG_INFO(0, raw_output) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_sha1_file, 0, 0, 1) - ZEND_ARG_INFO(0, filename) - ZEND_ARG_INFO(0, raw_output) -ZEND_END_ARG_INFO() -/* }}} */ /* {{{ soundex.c */ ZEND_BEGIN_ARG_INFO(arginfo_soundex, 0) ZEND_ARG_INFO(0, str) diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index e6187a1f1f..b7b89a04cf 100644 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -132,6 +132,13 @@ function getmyinode() {} function getlastmod(): int {} +/* sha1.c */ + +function sha1(string $str, bool $raw_output = false): string {} + +/** @return string|false */ +function sha1_file(string $filename, bool $raw_output = false) {} + /* syslog.c */ #ifdef HAVE_SYSLOG_H diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index 587b7c3b57..0981640447 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -148,6 +148,10 @@ ZEND_END_ARG_INFO() #define arginfo_getlastmod arginfo_ob_get_level +#define arginfo_sha1 arginfo_md5 + +#define arginfo_sha1_file arginfo_md5_file + #if defined(HAVE_SYSLOG_H) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openlog, 0, 3, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, ident, IS_STRING, 0)