helly Sun Dec 17 23:23:33 2006 UTC
Modified files:
/php-src/ext/spl spl_observer.c
/php-src/ext/spl/tests observer_003.phpt
Log:
- Make this work in unicode mode
# Well of course i should have set the return type to ascii here :-)
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_observer.c?r1=1.11&r2=1.12&diff_format=u
Index: php-src/ext/spl/spl_observer.c
diff -u php-src/ext/spl/spl_observer.c:1.11 php-src/ext/spl/spl_observer.c:1.12
--- php-src/ext/spl/spl_observer.c:1.11 Sat Dec 16 13:55:14 2006
+++ php-src/ext/spl/spl_observer.c Sun Dec 17 23:23:33 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_observer.c,v 1.11 2006/12/16 13:55:14 helly Exp $ */
+/* $Id: spl_observer.c,v 1.12 2006/12/17 23:23:33 helly Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -304,7 +304,7 @@
PHP_VAR_SERIALIZE_DESTROY(var_hash);
if (buf.c) {
- RETURN_STRINGL(buf.c, buf.len, 0);
+ RETURN_ASCII_STRINGL(buf.c, buf.len, 0);
} else {
RETURN_NULL();
}
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/observer_003.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/spl/tests/observer_003.phpt
diff -u php-src/ext/spl/tests/observer_003.phpt:1.1
php-src/ext/spl/tests/observer_003.phpt:1.2
--- php-src/ext/spl/tests/observer_003.phpt:1.1 Sat Dec 16 13:55:14 2006
+++ php-src/ext/spl/tests/observer_003.phpt Sun Dec 17 23:23:33 2006
@@ -56,3 +56,16 @@
string(3) "foo"
bool(true)
===DONE===
+--UEXPECT--
+int(4)
+int(1)
+unicode(1) "2"
+unicode(3) "foo"
+bool(true)
+===UNSERIALIZE===
+int(4)
+int(1)
+unicode(1) "2"
+unicode(3) "foo"
+bool(true)
+===DONE===
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php