cvs: ZendEngine2 / zend.c zend.h zend_API.c zend_API.h zend_builtin_functions.c zend_object_handlers.c
| From: | Stanislav Malyshev | Date: | Wed, 04 Jun 2003 08:16:56 +0000 |
| Subject: | cvs: ZendEngine2 / zend.c zend.h zend_API.c zend_API.h zend_builtin_functions.c zend_object_handlers.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-1324@lists.php.net to get a copy of this message | ||
stas Wed Jun 4 04:16:56 2003 EDT
Modified files:
/ZendEngine2 zend.c zend.h zend_API.c zend_API.h
zend_builtin_functions.c zend_object_handlers.c
Log:
rm namespace leftovers
Index: ZendEngine2/zend.c
diff -u ZendEngine2/zend.c:1.232 ZendEngine2/zend.c:1.233
--- ZendEngine2/zend.c:1.232 Wed Jun 4 03:46:22 2003
+++ ZendEngine2/zend.c Wed Jun 4 04:16:55 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend.c,v 1.232 2003/06/04 07:46:22 sebastian Exp $ */
+/* $Id: zend.c,v 1.233 2003/06/04 08:16:55 stas Exp $ */
#include "zend.h"
#include "zend_extensions.h"
@@ -568,7 +568,6 @@
GLOBAL_FUNCTION_TABLE = (HashTable *) malloc(sizeof(HashTable));
GLOBAL_CLASS_TABLE = (HashTable *) malloc(sizeof(HashTable));
GLOBAL_AUTO_GLOBALS_TABLE = (HashTable *) malloc(sizeof(HashTable));
- GLOBAL_CONSTANTS_TABLE = (HashTable *) malloc(sizeof(HashTable));
zend_hash_init_ex(GLOBAL_FUNCTION_TABLE, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0);
zend_hash_init_ex(GLOBAL_CLASS_TABLE, 10, NULL, ZEND_CLASS_DTOR, 1, 0);
Index: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.208 ZendEngine2/zend.h:1.209
--- ZendEngine2/zend.h:1.208 Mon Jun 2 08:13:10 2003
+++ ZendEngine2/zend.h Wed Jun 4 04:16:55 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend.h,v 1.208 2003/06/02 12:13:10 stas Exp $ */
+/* $Id: zend.h,v 1.209 2003/06/04 08:16:55 stas Exp $ */
#ifndef ZEND_H
#define ZEND_H
@@ -308,7 +308,6 @@
HashTable *static_members;
HashTable constants_table;
zend_function_entry *builtin_functions;
- struct _zend_class_entry *ns;
union _zend_function *constructor;
union _zend_function *destructor;
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.174 ZendEngine2/zend_API.c:1.175
--- ZendEngine2/zend_API.c:1.174 Mon Jun 2 08:13:10 2003
+++ ZendEngine2/zend_API.c Wed Jun 4 04:16:55 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.c,v 1.174 2003/06/02 12:13:10 stas Exp $ */
+/* $Id: zend_API.c,v 1.175 2003/06/04 08:16:55 stas Exp $ */
#include "zend.h"
#include "zend_execute.h"
@@ -1563,29 +1563,6 @@
return NULL;
}
return module->version;
-}
-
-ZEND_API void zend_make_full_classname(zend_class_entry *ce, char **name, zend_uint *name_len)
-{
- int len = ce->name_length;
- char *full_name;
-
- if(ce->ns && ce->ns->name) {
- len += ce->ns->name_length + 2;
- }
-
- *name = full_name = emalloc(len+1);
- *name_len = len;
-
- if(ce->ns && ce->ns->name) {
- memcpy(full_name, ce->ns->name, ce->ns->name_length);
- full_name += ce->ns->name_length;
- *(full_name++) = ':';
- *(full_name++) = ':';
- }
-
- memcpy(full_name, ce->name, ce->name_length);
- full_name[ce->name_length] = '\0';
}
/*
Index: ZendEngine2/zend_API.h
diff -u ZendEngine2/zend_API.h:1.142 ZendEngine2/zend_API.h:1.143
--- ZendEngine2/zend_API.h:1.142 Mon Jun 2 08:13:10 2003
+++ ZendEngine2/zend_API.h Wed Jun 4 04:16:55 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.h,v 1.142 2003/06/02 12:13:10 stas Exp $ */
+/* $Id: zend_API.h,v 1.143 2003/06/04 08:16:55 stas Exp $ */
#ifndef ZEND_API_H
#define ZEND_API_H
@@ -256,8 +256,6 @@
ZEND_API ZEND_FUNCTION(display_disabled_function);
ZEND_API ZEND_FUNCTION(display_disabled_class);
-
-ZEND_API void zend_make_full_classname(zend_class_entry *ce, char **name, zend_uint *name_len);
#if ZEND_DEBUG
#define CHECK_ZVAL_STRING(z) \
Index: ZendEngine2/zend_builtin_functions.c
diff -u ZendEngine2/zend_builtin_functions.c:1.190 ZendEngine2/zend_builtin_functions.c:1.191
--- ZendEngine2/zend_builtin_functions.c:1.190 Mon Jun 2 08:13:10 2003
+++ ZendEngine2/zend_builtin_functions.c Wed Jun 4 04:16:55 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_builtin_functions.c,v 1.190 2003/06/02 12:13:10 stas Exp $ */
+/* $Id: zend_builtin_functions.c,v 1.191 2003/06/04 08:16:55 stas Exp $ */
#include "zend.h"
#include "zend_API.h"
@@ -535,12 +535,7 @@
RETURN_FALSE;
}
- if(ce->ns) {
- zend_make_full_classname(ce, &name, &name_len);
- RETURN_STRINGL(name, name_len, 0);
- } else {
- RETURN_STRINGL(ce->name, ce->name_length, 1);
- }
+ RETURN_STRINGL(ce->name, ce->name_length, 1);
}
RETURN_STRINGL(name, name_len, 0);
@@ -567,8 +562,7 @@
&& Z_OBJ_HT_PP(arg)->get_class_name(*arg, &name, &name_length, 1 TSRMLS_CC)
== SUCCESS) {
RETURN_STRINGL(name, name_length, 0);
} else if (Z_OBJ_HT_PP(arg)->get_class_entry && (ce = zend_get_class_entry(*arg
TSRMLS_CC))) {
- zend_make_full_classname(ce, &name, &name_length);
- RETURN_STRINGL(name, name_length, 0);
+ RETURN_STRINGL(ce->name, ce->name_length, 1);
} else {
RETURN_FALSE;
}
@@ -583,8 +577,7 @@
}
if (ce && ce->parent) {
- zend_make_full_classname(ce->parent, &name, &name_length);
- RETURN_STRINGL(name, name_length, 0);
+ RETURN_STRINGL(ce->parent->name, ce->parent->name_length, 1);
} else {
RETURN_FALSE;
}
Index: ZendEngine2/zend_object_handlers.c
diff -u ZendEngine2/zend_object_handlers.c:1.50 ZendEngine2/zend_object_handlers.c:1.51
--- ZendEngine2/zend_object_handlers.c:1.50 Mon Jun 2 08:13:11 2003
+++ ZendEngine2/zend_object_handlers.c Wed Jun 4 04:16:55 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_object_handlers.c,v 1.50 2003/06/02 12:13:11 stas Exp $ */
+/* $Id: zend_object_handlers.c,v 1.51 2003/06/04 08:16:55 stas Exp $ */
#include "zend.h"
#include "zend_globals.h"
@@ -802,7 +802,8 @@
ce = zobj->ce;
}
- zend_make_full_classname(ce, class_name, class_name_len);
+ *class_name_len = ce->name_length;
+ *class_name = estrndup(ce->name, ce->name_length);
return SUCCESS;
}