cvs: ZendEngine2 / zend_builtin_functions.c
[email protected] ("Ilia Alshanetsky") Thu, 05 Mar 2009 13:45:32 -0000
| Newsgroups | php.zend-engine.cvs |
|---|---|
| Message-ID | <cvsiliaa1236260732@cvsserver> |
iliaa Thu Mar 5 13:45:32 2009 UTC
Modified files:
/ZendEngine2 zend_builtin_functions.c
Log:
Removed bogus code
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_builtin_functions.c?r1=1.398&r2=1.399&diff_format=u
Index: ZendEngine2/zend_builtin_functions.c
diff -u ZendEngine2/zend_builtin_functions.c:1.398 ZendEngine2/zend_builtin_functions.c:1.399
--- ZendEngine2/zend_builtin_functions.c:1.398 Tue Mar 3 23:43:06 2009
+++ ZendEngine2/zend_builtin_functions.c Thu Mar 5 13:45:32 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_builtin_functions.c,v 1.398 2009/03/03 23:43:06 iliaa Exp $ */
+/* $Id: zend_builtin_functions.c,v 1.399 2009/03/05 13:45:32 iliaa Exp $ */
#include "zend.h"
#include "zend_API.h"
@@ -627,40 +627,6 @@
return;
}
- /* check if class constant */
- if ((p = memchr(name, ':', name_len))) {
- char *s = name;
- zend_class_entry **ce;
-
- if (*(p + 1) != ':') { /* invalid constant specifier */
- RETURN_FALSE;
- } else if ((p + 2) >= (name + name_len)) { /* constant name length < 1 */
- zend_error(E_WARNING, "Constants name cannot be empty");
- RETURN_FALSE;
- } else if (zend_lookup_class(s, (p - s), &ce TSRMLS_CC) != SUCCESS) { /* invalid class name */
- zend_error(E_WARNING, "Class does not exists");
- RETURN_FALSE;
- } else { /* check of constant name contains invalid chars */
- int ok = 1;
- p += 2; /* move beyond :: to 1st char of constant's name */
-
- if (!isalpha(*p) && *p != '_') {
- ok = 0;
- }
-
- while (ok && *++p) {
- if (!isalnum(*p) && *p != '_') {
- ok = 0;
- break;
- }
- }
-
- if (!ok) {
- RETURN_FALSE;
- }
- }
- }
-
if(non_cs) {
case_sensitive = 0;
}