cvs: ZendEngine2 / zend_execute_API.c
| From: | Marcus Boerger | Date: | Fri, 07 Nov 2003 11:47:50 +0000 |
| Subject: | cvs: ZendEngine2 / zend_execute_API.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-1968@lists.php.net to get a copy of this message | ||
helly Fri Nov 7 06:47:50 2003 EDT
Modified files:
/ZendEngine2 zend_execute_API.c
Log:
Make __autoload() faster
Index: ZendEngine2/zend_execute_API.c
diff -u ZendEngine2/zend_execute_API.c:1.239 ZendEngine2/zend_execute_API.c:1.240
--- ZendEngine2/zend_execute_API.c:1.239 Fri Oct 24 14:42:00 2003
+++ ZendEngine2/zend_execute_API.c Fri Nov 7 06:47:50 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute_API.c,v 1.239 2003/10/24 18:42:00 helly Exp $ */
+/* $Id: zend_execute_API.c,v 1.240 2003/11/07 11:47:50 helly Exp $ */
#include <stdio.h>
#include <signal.h>
@@ -778,8 +778,8 @@
ZEND_API int zend_lookup_class(char *name, int name_length, zend_class_entry ***ce TSRMLS_DC)
{
zval **args[1];
- zval *autoload_function;
- zval *class_name;
+ zval autoload_function;
+ zval class_name, *class_name_ptr = &class_name;
zval *retval_ptr;
int retval;
@@ -787,17 +787,14 @@
return SUCCESS;
}
- MAKE_STD_ZVAL(autoload_function);
- ZVAL_STRINGL(autoload_function, "__autoload", sizeof("__autoload")-1, 1);
+ ZVAL_STRINGL(&autoload_function, "__autoload", sizeof("__autoload")-1,
0);
- MAKE_STD_ZVAL(class_name);
- ZVAL_STRINGL(class_name, name, name_length, 1);
- args[0] = &class_name;
+ INIT_PZVAL(class_name_ptr);
+ ZVAL_STRINGL(class_name_ptr, name, name_length, 0);
+
+ args[0] = &class_name_ptr;
- retval = call_user_function_ex(EG(function_table), NULL, autoload_function, &retval_ptr, 1,
args, 0, NULL TSRMLS_CC);
-
- zval_ptr_dtor(&autoload_function);
- zval_ptr_dtor(&class_name);
+ retval = call_user_function_ex(EG(function_table), NULL, &autoload_function, &retval_ptr,
1, args, 0, NULL TSRMLS_CC);
if (retval == FAILURE) {
return FAILURE;