diff options
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r-- | Zend/zend_execute_API.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 5edc65e93e..7d5af4e9aa 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -51,8 +51,8 @@ static WNDCLASS wc; static HWND timeout_window; static HANDLE timeout_thread_event; static HANDLE timeout_thread_handle; -static DWORD timeout_thread_id; -static int timeout_thread_initialized=0; +static unsigned timeout_thread_id; +static volatile long timeout_thread_initialized=0; #endif #if 0&&ZEND_DEBUG @@ -736,7 +736,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS } func = fci_cache->function_handler; - call = zend_vm_stack_push_call_frame(VM_FRAME_TOP_FUNCTION, + call = zend_vm_stack_push_call_frame(ZEND_CALL_TOP_FUNCTION, func, fci->param_count, fci_cache->called_scope, fci_cache->object, NULL TSRMLS_CC); calling_scope = fci_cache->calling_scope; fci->object = fci_cache->object; @@ -787,7 +787,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS !ARG_MAY_BE_SENT_BY_REF(func, i + 1)) { if (i) { /* hack to clean up the stack */ - call->num_args = i; + ZEND_CALL_NUM_ARGS(call) = i; zend_vm_stack_free_args(call TSRMLS_CC); } zend_vm_stack_free_call_frame(call TSRMLS_CC); @@ -827,7 +827,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS ZVAL_COPY(param, &fci->params[i]); } } - call->num_args = fci->param_count; + ZEND_CALL_NUM_ARGS(call) = fci->param_count; EG(scope) = calling_scope; if (func->common.fn_flags & ZEND_ACC_STATIC) { @@ -835,9 +835,8 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS } if (!fci->object) { Z_OBJ(call->This) = NULL; - Z_TYPE_INFO(call->This) = IS_UNDEF; } else { - ZVAL_OBJ(&call->This, fci->object); + Z_OBJ(call->This) = fci->object; GC_REFCOUNT(fci->object)++; } @@ -1166,6 +1165,10 @@ ZEND_API void zend_timeout(int dummy) /* {{{ */ #ifdef ZEND_WIN32 static LRESULT CALLBACK zend_timeout_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) /* {{{ */ { +#ifdef ZTS + THREAD_T thread_id = (THREAD_T)wParam; +#endif + switch (message) { case WM_DESTROY: PostQuitMessage(0); @@ -1180,7 +1183,7 @@ static LRESULT CALLBACK zend_timeout_WndProc(HWND hWnd, UINT message, WPARAM wPa #endif SetTimer(timeout_window, wParam, lParam*1000, NULL); #ifdef ZTS - tsrm_ls = ts_resource_ex(0, &wParam); + tsrm_ls = ts_resource_ex(0, &thread_id); if (!tsrm_ls) { /* shouldn't normally happen */ break; @@ -1197,7 +1200,7 @@ static LRESULT CALLBACK zend_timeout_WndProc(HWND hWnd, UINT message, WPARAM wPa #ifdef ZTS void ***tsrm_ls; - tsrm_ls = ts_resource_ex(0, &wParam); + tsrm_ls = ts_resource_ex(0, &thread_id); if (!tsrm_ls) { /* Thread died before receiving its timeout? */ break; @@ -1529,7 +1532,7 @@ ZEND_API zend_array *zend_rebuild_symbol_table(TSRMLS_D) /* {{{ */ for (i = 0; i < ex->func->op_array.last_var; i++) { zval zv; - ZVAL_INDIRECT(&zv, EX_VAR_NUM_2(ex, i)); + ZVAL_INDIRECT(&zv, ZEND_CALL_VAR_NUM(ex, i)); zend_hash_add_new(&symbol_table->ht, ex->func->op_array.vars[i], &zv); } |