summaryrefslogtreecommitdiff
path: root/ext/standard/md5.c
diff options
context:
space:
mode:
authorSara Golemon <pollita@php.net>2016-12-30 13:05:51 -0800
committerSara Golemon <pollita@php.net>2016-12-30 13:17:52 -0800
commit625304fa7666ce0e3445c5f92ecb689a48ed9d8e (patch)
tree778a6cf6d77bc311d3f42157f8a355b15d2812c3 /ext/standard/md5.c
parentc714152e586d648dac0126ee942102f7800c8d3c (diff)
downloadphp-git-625304fa7666ce0e3445c5f92ecb689a48ed9d8e.tar.gz
Use new param API in standard
Diffstat (limited to 'ext/standard/md5.c')
-rw-r--r--ext/standard/md5.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/ext/standard/md5.c b/ext/standard/md5.c
index 825df21c69..cb43e67441 100644
--- a/ext/standard/md5.c
+++ b/ext/standard/md5.c
@@ -52,9 +52,11 @@ PHP_NAMED_FUNCTION(php_if_md5)
PHP_MD5_CTX context;
unsigned char digest[16];
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|b", &arg, &raw_output) == FAILURE) {
- return;
- }
+ ZEND_PARSE_PARAMETERS_START(1, 2)
+ Z_PARAM_STR(arg)
+ Z_PARAM_OPTIONAL
+ Z_PARAM_BOOL(raw_output)
+ ZEND_PARSE_PARAMETERS_END();
md5str[0] = '\0';
PHP_MD5Init(&context);
@@ -84,9 +86,11 @@ PHP_NAMED_FUNCTION(php_if_md5_file)
size_t n;
php_stream *stream;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|b", &arg, &arg_len, &raw_output) == FAILURE) {
- return;
- }
+ ZEND_PARSE_PARAMETERS_START(1, 2)
+ Z_PARAM_PATH(arg, arg_len)
+ Z_PARAM_OPTIONAL
+ Z_PARAM_BOOL(raw_output)
+ ZEND_PARSE_PARAMETERS_END();
stream = php_stream_open_wrapper(arg, "rb", REPORT_ERRORS, NULL);
if (!stream) {