]> granicus.if.org Git - php/commitdiff
Pass the executor globals to internal functions
authorZeev Suraski <zeev@php.net>
Sat, 5 Feb 2000 15:40:05 +0000 (15:40 +0000)
committerZeev Suraski <zeev@php.net>
Sat, 5 Feb 2000 15:40:05 +0000 (15:40 +0000)
Zend/zend.h
Zend/zend_builtin_functions.c
Zend/zend_execute.c
Zend/zend_execute_API.c

index d1035857f87d614839fcd0969247203eacd9f2ee..94e9cc0f7f77691a84f98433bc5079cdcb6c145c 100644 (file)
@@ -117,8 +117,8 @@ typedef unsigned char zend_bool;
 #include "zend_hash.h"
 #include "zend_llist.h"
 
-#define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, zval *this_ptr, int return_value_used
-#define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, this_ptr, return_value_used
+#define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, zval *this_ptr, int return_value_used ELS_DC
+#define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, this_ptr, return_value_used ELS_CC
 
 /*
  * zval
index b828a8bd7f98b62bc30b332e2045e5353309c461..15a875e0e52b977b1fdc1683b74196c2878689b5 100644 (file)
@@ -89,7 +89,6 @@ ZEND_FUNCTION(func_num_args)
 {
        void **p;
        int arg_count;
-       ELS_FETCH();
 
        p = EG(argument_stack).top_element-1;
        arg_count = (ulong) *p;         /* this is the amount of arguments passed to func_num_args(); */
@@ -111,7 +110,6 @@ ZEND_FUNCTION(func_get_arg)
        zval **z_requested_offset;
        zval *arg;
        long requested_offset;
-       ELS_FETCH();
 
        if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &z_requested_offset)==FAILURE) {
                RETURN_FALSE;
@@ -145,7 +143,6 @@ ZEND_FUNCTION(func_get_args)
        void **p;
        int arg_count;
        int i;
-       ELS_FETCH();
 
        p = EG(argument_stack).top_element-1;
        arg_count = (ulong) *p;         /* this is the amount of arguments passed to func_num_args(); */
@@ -269,7 +266,6 @@ ZEND_FUNCTION(error_reporting)
 {
        zval **arg;
        int old_error_reporting;
-       ELS_FETCH();
 
        old_error_reporting = EG(error_reporting);
        switch (ZEND_NUM_ARGS()) {
@@ -295,7 +291,6 @@ ZEND_FUNCTION(define)
        zval **var, **val, **non_cs;
        int case_sensitive;
        zend_constant c;
-       ELS_FETCH();
        
        switch(ZEND_NUM_ARGS()) {
                case 2:
@@ -486,7 +481,6 @@ ZEND_FUNCTION(function_exists)
        zval **function_name;
        char *lcname;
        int retval;
-       ELS_FETCH();
        
        if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &function_name)==FAILURE) {
                WRONG_PARAM_COUNT;
@@ -549,8 +543,6 @@ ZEND_FUNCTION(get_used_files)
 
 ZEND_FUNCTION(get_imported_files)
 {
-       ELS_FETCH();
-
        array_init(return_value);
        zend_hash_apply_with_argument(&EG(imported_files), (int (*)(void *, void *)) copy_import_use_file, return_value);
 }
index 10468da0e1ae350d2f2469de1b3e972a1b40e7b7..86f5548614217993384ba81467d57fcb7b0783b5 100644 (file)
@@ -930,7 +930,7 @@ static void call_overloaded_function(int arg_count, zval *return_value, HashTabl
        zend_property_reference *property_reference;
 
        zend_stack_top(&EG(overloaded_objects_stack), (void **) &property_reference);
-       (property_reference->object)->value.obj.ce->handle_function_call(arg_count, return_value, property_reference->object, 1, property_reference);
+       (property_reference->object)->value.obj.ce->handle_function_call(arg_count, return_value, property_reference->object, 1 ELS_CC, property_reference);
        zend_llist_destroy(&property_reference->elements_list);
 
        zend_stack_del_top(&EG(overloaded_objects_stack));
@@ -1534,7 +1534,7 @@ do_fcall_common:
                                        if (function_state.function->type==ZEND_INTERNAL_FUNCTION) {    
                                                ALLOC_ZVAL(Ts[opline->result.u.var].var.ptr);
                                                INIT_ZVAL(*(Ts[opline->result.u.var].var.ptr));
-                                               ((zend_internal_function *) function_state.function)->handler(opline->extended_value, Ts[opline->result.u.var].var.ptr, object.ptr, return_value_used);
+                                               ((zend_internal_function *) function_state.function)->handler(opline->extended_value, Ts[opline->result.u.var].var.ptr, object.ptr, return_value_used ELS_CC);
                                                if (object.ptr) {
                                                        object.ptr->refcount--;
                                                }
index 877ce8082cdb45c51d46781fa12f1bd9714008b2..b8e4aa62db35f05fb8f99d1bd98ab8405fc0d88c 100644 (file)
@@ -415,7 +415,7 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio
                EG(opline_ptr) = original_opline_ptr;
        } else {
                ALLOC_INIT_ZVAL(*retval_ptr_ptr);
-               ((zend_internal_function *) function_state.function)->handler(param_count, *retval_ptr_ptr, object, 1);
+               ((zend_internal_function *) function_state.function)->handler(param_count, *retval_ptr_ptr, object, 1 ELS_CC);
                INIT_PZVAL(*retval_ptr_ptr);
        }
        zend_ptr_stack_clear_multiple(ELS_C);