pollita         Sun Sep 24 17:09:46 2006 UTC

  Modified files:              
    /php-src/ext/standard       md5.c sha1.c 
  Log:
  PHP6 Updates
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/md5.c?r1=1.46&r2=1.47&diff_format=u
Index: php-src/ext/standard/md5.c
diff -u php-src/ext/standard/md5.c:1.46 php-src/ext/standard/md5.c:1.47
--- php-src/ext/standard/md5.c:1.46     Thu Mar  2 13:12:45 2006
+++ php-src/ext/standard/md5.c  Sun Sep 24 17:09:46 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: md5.c,v 1.46 2006/03/02 13:12:45 dmitry Exp $ */
+/* $Id: md5.c,v 1.47 2006/09/24 17:09:46 pollita Exp $ */
 
 /* 
  * md5.c - Copyright 1997 Lachlan Roche 
@@ -38,7 +38,7 @@
        *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_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 @@
                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 @@
        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 @@
                RETURN_STRINGL((char*)digest, 16, 1);
        } else {
                make_digest(md5str, digest);
-               RETVAL_ASCII_STRING(md5str, 1);
+               RETVAL_ASCII_STRING(md5str, ZSTR_DUPLICATE);
        }
 }
 /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/sha1.c?r1=1.17&r2=1.18&diff_format=u
Index: php-src/ext/standard/sha1.c
diff -u php-src/ext/standard/sha1.c:1.17 php-src/ext/standard/sha1.c:1.18
--- php-src/ext/standard/sha1.c:1.17    Thu Mar  2 13:12:45 2006
+++ php-src/ext/standard/sha1.c Sun Sep 24 17:09:46 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: sha1.c,v 1.17 2006/03/02 13:12:45 dmitry Exp $ */
+/* $Id: sha1.c,v 1.18 2006/09/24 17:09:46 pollita Exp $ */
 
 #include "php.h"
 
@@ -36,7 +36,7 @@
        *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_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 @@
                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 @@
 /* }}} */
 
 
-/* {{{ 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 @@
        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 @@
                RETURN_STRINGL((char*)digest, 20, 1);
        } else {
                make_sha1_digest(sha1str, digest);
-               RETVAL_ASCII_STRING(sha1str, 1);
+               RETVAL_ASCII_STRING(sha1str, ZSTR_DUPLICATE);
        }
 }
 /* }}} */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to