diff options
author | Sara Golemon <pollita@php.net> | 2006-09-24 17:09:46 +0000 |
---|---|---|
committer | Sara Golemon <pollita@php.net> | 2006-09-24 17:09:46 +0000 |
commit | 1f8bbc65a614f214b4bdf9ceb397b94e2f324290 (patch) | |
tree | 81c10a07260c4e627480daf6bf4384f7e49bb70c | |
parent | 1a13bdc516888d630d3bed1be6644e2bf148d7c9 (diff) | |
download | php-git-1f8bbc65a614f214b4bdf9ceb397b94e2f324290.tar.gz |
PHP6 Updates
-rw-r--r-- | ext/standard/md5.c | 12 | ||||
-rw-r--r-- | ext/standard/sha1.c | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/ext/standard/md5.c b/ext/standard/md5.c index ce1338888f..1383ae5aac 100644 --- a/ext/standard/md5.c +++ b/ext/standard/md5.c @@ -38,7 +38,7 @@ PHPAPI void make_digest(char *md5str, unsigned char *digest) *md5str = '\0'; } -/* {{{ proto string md5(string str, [ bool raw_output]) +/* {{{ proto string md5(string str, [ bool raw_output]) U Calculate the md5 hash of a string */ PHP_NAMED_FUNCTION(php_if_md5) { @@ -49,7 +49,7 @@ PHP_NAMED_FUNCTION(php_if_md5) PHP_MD5_CTX context; unsigned char digest[16]; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &arg, &arg_len, &raw_output) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|b", &arg, &arg_len, &raw_output) == FAILURE) { return; } @@ -61,13 +61,13 @@ PHP_NAMED_FUNCTION(php_if_md5) RETURN_STRINGL((char*)digest, 16, 1); } else { make_digest(md5str, digest); - RETVAL_ASCII_STRING(md5str, 1); + RETVAL_ASCII_STRING(md5str, ZSTR_DUPLICATE); } } /* }}} */ -/* {{{ proto string md5_file(string filename [, bool raw_output]) +/* {{{ proto string md5_file(string filename [, bool raw_output]) U Calculate the md5 hash of given filename */ PHP_NAMED_FUNCTION(php_if_md5_file) { @@ -81,7 +81,7 @@ PHP_NAMED_FUNCTION(php_if_md5_file) int n; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &arg, &arg_len, &raw_output) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|b", &arg, &arg_len, &raw_output) == FAILURE) { return; } @@ -108,7 +108,7 @@ PHP_NAMED_FUNCTION(php_if_md5_file) RETURN_STRINGL((char*)digest, 16, 1); } else { make_digest(md5str, digest); - RETVAL_ASCII_STRING(md5str, 1); + RETVAL_ASCII_STRING(md5str, ZSTR_DUPLICATE); } } /* }}} */ diff --git a/ext/standard/sha1.c b/ext/standard/sha1.c index 0c30604275..fdfee17e1f 100644 --- a/ext/standard/sha1.c +++ b/ext/standard/sha1.c @@ -36,7 +36,7 @@ PHPAPI void make_sha1_digest(char *sha1str, unsigned char *digest) *sha1str = '\0'; } -/* {{{ proto string sha1(string str [, bool raw_output]) +/* {{{ proto string sha1(string str [, bool raw_output]) U Calculate the sha1 hash of a string */ PHP_FUNCTION(sha1) { @@ -47,7 +47,7 @@ PHP_FUNCTION(sha1) PHP_SHA1_CTX context; unsigned char digest[20]; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &arg, &arg_len, &raw_output) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|b", &arg, &arg_len, &raw_output) == FAILURE) { return; } @@ -59,7 +59,7 @@ PHP_FUNCTION(sha1) RETURN_STRINGL((char*)digest, 20, 1); } else { make_sha1_digest(sha1str, digest); - RETVAL_ASCII_STRING(sha1str, 1); + RETVAL_ASCII_STRING(sha1str, ZSTR_DUPLICATE); } } @@ -67,7 +67,7 @@ PHP_FUNCTION(sha1) /* }}} */ -/* {{{ proto string sha1_file(string filename [, bool raw_output]) +/* {{{ proto string sha1_file(string filename [, bool raw_output]) U Calculate the sha1 hash of given filename */ PHP_FUNCTION(sha1_file) { @@ -81,7 +81,7 @@ PHP_FUNCTION(sha1_file) int n; php_stream *stream; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &arg, &arg_len, &raw_output) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|b", &arg, &arg_len, &raw_output) == FAILURE) { return; } @@ -108,7 +108,7 @@ PHP_FUNCTION(sha1_file) RETURN_STRINGL((char*)digest, 20, 1); } else { make_sha1_digest(sha1str, digest); - RETVAL_ASCII_STRING(sha1str, 1); + RETVAL_ASCII_STRING(sha1str, ZSTR_DUPLICATE); } } /* }}} */ |