cvs: ZendEngine2 / zend_API.c
[email protected] ("Marcus Boerger")
| Newsgroups | php.zend-engine.cvs |
|---|---|
| Message-ID | <cvshelly1202334797@cvsserver> |
helly Wed Feb 6 21:53:17 2008 UTC
Modified files:
/ZendEngine2 zend_API.c
Log:
- Fix unicode
# I hate unicode, it is getting tooo complex
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_API.c?r1=1.459&r2=1.460&diff_format=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.459 ZendEngine2/zend_API.c:1.460
--- ZendEngine2/zend_API.c:1.459 Wed Feb 6 20:39:54 2008
+++ ZendEngine2/zend_API.c Wed Feb 6 21:53:17 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.c,v 1.459 2008/02/06 20:39:54 helly Exp $ */
+/* $Id: zend_API.c,v 1.460 2008/02/06 21:53:17 helly Exp $ */
#include "zend.h"
#include "zend_execute.h"
@@ -2728,9 +2728,11 @@
*ce_ptr = zend_u_fetch_class(Z_TYPE_P(callable), Z_UNIVAL_P(callable), clen, ZEND_FETCH_CLASS_AUTO | ZEND_FETCH_CLASS_SILENT TSRMLS_CC);
EG(scope) = last_scope;
if (!*ce_ptr) {
- char *cname = estrndup(Z_STRVAL_P(callable), clen);
- if (error) zend_spprintf(error, 0, "class '%v' not found", cname);
- efree(cname);
+ if (error) {
+ zstr cname = ezstrndup(Z_TYPE_P(callable), Z_UNIVAL_P(callable), clen);
+ zend_spprintf(error, 0, "class '%R' not found", Z_TYPE_P(callable), cname.v);
+ efree(cname.v);
+ }
return 0;
}
ftable = &(*ce_ptr)->function_table;
@@ -2746,7 +2748,7 @@
*ce_ptr = ce_org;
} else {
/* We already checked for plain function before. */
- if (error) zend_spprintf(error, 0, "function '%v' not found or invalid function name", Z_STRVAL_P(callable));
+ if (error) zend_spprintf(error, 0, "function '%R' not found or invalid function name", Z_TYPE_P(callable), Z_UNIVAL_P(callable));
return 0;
}