RETURN_BINARY() already returns IS_BINARY in Unicode mode and IS_STRING
in non-Unicode.
-Andrei
On Aug 16, 2005, at 11:01 PM, Dmitry Stogov wrote:
May be it should return IS_BINARY only in unicode mode, and IS_STRING
in
non-unicode (as before)?
Dmitry.
-----Original Message-----
From: Andrei Zmievski [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 16, 2005 11:45 PM
To: php-cvs@lists.php.net
Subject: [PHP-CVS] cvs: php-src /ext/standard md5.c
andrei Tue Aug 16 15:45:01 2005 EDT
Modified files:
/php-src/ext/standard md5.c
Log:
md5() and md5_file() should return binary strings when raw_output is
set.
http://cvs.php.net/diff.php/php-src/ext/standard/md5.c?r1=1.40
&r2=1.41&ty=u
Index: php-src/ext/standard/md5.c
diff -u php-src/ext/standard/md5.c:1.40 php-src/ext/standard/md5.c:1.41
--- php-src/ext/standard/md5.c:1.40 Tue Aug 16 06:18:41 2005
+++ php-src/ext/standard/md5.c Tue Aug 16 15:45:00 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------
+
*/
-/* $Id: md5.c,v 1.40 2005/08/16 10:18:41 dmitry Exp $ */
+/* $Id: md5.c,v 1.41 2005/08/16 19:45:00 andrei Exp $ */
/*
* md5.c - Copyright 1997 Lachlan Roche
@@ -58,7 +58,7 @@
PHP_MD5Update(&context, arg, arg_len);
PHP_MD5Final(digest, &context);
if (raw_output) {
- RETURN_STRINGL(digest, 16, 1);
+ RETURN_BINARYL(digest, 16, 1);
} else {
make_digest(md5str, digest);
if (UG(unicode)) {
@@ -110,7 +110,7 @@
}
if (raw_output) {
- RETURN_STRINGL(digest, 16, 1);
+ RETURN_BINARYL(digest, 16, 1);
} else {
make_digest(md5str, digest);
if (UG(unicode)) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php