Re: cvs: php-src /ext/standard var.c

From: Date: Mon, 15 Aug 2005 03:21:42 +0000
Subject: Re: cvs: php-src /ext/standard var.c
References: 1 2  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-33390@lists.php.net to get a copy of this message
When unicode_semantics=on, all identifiers are Unicode. You can rely on that and test for it with UG(unicode) flag. -Andrei On Aug 14, 2005, at 12:00 PM, Antony Dovgal wrote:
This is what I get after your patch: object(test)#1 (3) { @["private_prop:u"整瑳瀀楲慶整灟潲p첄⪏*8S@8S@":private"]=> string(7) "private" @["public_prop"]=> string(6) "public" @["protected_prop:protected"]=> string(9) "protected" } The garbage instead of the classname is shown because we can't determine if the classname is in Unicode or not (though I still can see the same garbage even when the classname is in Unicode). Btw, I don't get the point in adding classname to private vars, while the class name is printed just before that: object(<classname>)? - No 3rd " which doesn't help parsing What's the problem with the 3rd " ? No we got no " at the end. Marcus Boerger wrote:
helly        Sun Aug 14 11:18:46 2005 EDT
  Modified files:                  /php-src/ext/standard    var.c   Log:
  - If prop_name is printed as unicode then class_name needs to be treated     in the exact same manner
    http://cvs.php.net/diff.php/php-src/ext/standard/var.c?r1=1.206&r2=1.207&ty=u
Index: php-src/ext/standard/var.c diff -u php-src/ext/standard/var.c:1.206 php-src/ext/standard/var.c:1.207
--- php-src/ext/standard/var.c:1.206    Sun Aug 14 11:08:38 2005
+++ php-src/ext/standard/var.c    Sun Aug 14 11:18:46 2005
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
*/ -/* $Id: var.c,v 1.206 2005/08/14 15:08:38 helly Exp $ */ +/* $Id: var.c,v 1.207 2005/08/14 15:18:46 helly Exp $ */ @@ -163,7 +163,9 @@
             if (class_name[0]=='*') {
                 ZEND_PUTS(":protected");
             } else {
-                php_printf(":%s:private", class_name);
+                php_printf(":u");
+                php_var_dump_unicode((UChar*)class_name, u_strlen((UChar*)class_name), verbose TSRMLS_CC);
+                ZEND_PUTS(":private");
             }
         } else {
             if (hash_key->type == IS_STRING) {
--Wbr, Antony Dovgal --PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.cvs (#33390) next »