Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- Make it compile in thread-safe mode.

  • Loading branch information...
commit 619702157bbee57b7b2d0644b54dd3447c052a10 1 parent 67b9fb4
@andigutmans andigutmans authored
Showing with 12 additions and 12 deletions.
  1. +8 −8 Zend/zend_compile.c
  2. +4 −4 Zend/zend_compile.h
View
16 Zend/zend_compile.c
@@ -1104,7 +1104,7 @@ void zend_do_return(znode *expr, int do_end_vparse TSRMLS_DC)
}
-void zend_do_try(znode *try_token CLS_DC)
+void zend_do_try(znode *try_token TSRMLS_DC)
{
try_token->throw_list = (void *) CG(throw_list);
CG(throw_list) = (zend_llist *) emalloc(sizeof(zend_llist));
@@ -1115,7 +1115,7 @@ void zend_do_try(znode *try_token CLS_DC)
static void throw_list_applier(long *opline_num, long *catch_opline)
{
zend_op *opline;
- CLS_FETCH(); /* Pass this by argument */
+ TSRMLS_FETCH(); /* Pass this by argument */
opline = &CG(active_op_array)->opcodes[*opline_num];
@@ -1132,17 +1132,17 @@ static void throw_list_applier(long *opline_num, long *catch_opline)
}
}
-void zend_do_begin_catch(znode *try_token, znode *catch_var CLS_DC)
+void zend_do_begin_catch(znode *try_token, znode *catch_var TSRMLS_DC)
{
long catch_op_number = get_next_op_number(CG(active_op_array));
zend_op *opline;
- opline = get_next_op(CG(active_op_array) CLS_CC);
+ opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_CATCH;
opline->op1 = *catch_var;
SET_UNUSED(opline->op2);
- zend_llist_apply_with_argument(CG(throw_list), (llist_apply_with_arg_func_t) throw_list_applier, &catch_op_number);
+ zend_llist_apply_with_argument(CG(throw_list), (llist_apply_with_arg_func_t) throw_list_applier, &catch_op_number TSRMLS_CC);
zend_llist_destroy(CG(throw_list));
efree(CG(throw_list));
CG(throw_list) = (void *) try_token->throw_list;
@@ -1150,17 +1150,17 @@ void zend_do_begin_catch(znode *try_token, znode *catch_var CLS_DC)
try_token->u.opline_num = catch_op_number;
}
-void zend_do_end_catch(znode *try_token CLS_DC)
+void zend_do_end_catch(znode *try_token TSRMLS_DC)
{
CG(active_op_array)->opcodes[try_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array));
}
-void zend_do_throw(znode *expr CLS_DC)
+void zend_do_throw(znode *expr TSRMLS_DC)
{
zend_op *opline;
long throw_op_number = get_next_op_number(CG(active_op_array));
- opline = get_next_op(CG(active_op_array) CLS_CC);
+ opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_THROW;
opline->op1 = *expr;
SET_UNUSED(opline->op2);
View
8 Zend/zend_compile.h
@@ -282,10 +282,10 @@ void zend_do_begin_class_member_function_call(znode *class_name, znode *function
void zend_do_end_function_call(znode *function_name, znode *result, znode *argument_list, int is_method, int is_dynamic_fcall TSRMLS_DC);
void zend_do_return(znode *expr, int do_end_vparse TSRMLS_DC);
-void zend_do_try(znode *try_token CLS_DC);
-void zend_do_begin_catch(znode *try_token, znode *catch_var CLS_DC);
-void zend_do_end_catch(znode *try_token CLS_DC);
-void zend_do_throw(znode *expr CLS_DC);
+void zend_do_try(znode *try_token TSRMLS_DC);
+void zend_do_begin_catch(znode *try_token, znode *catch_var TSRMLS_DC);
+void zend_do_end_catch(znode *try_token TSRMLS_DC);
+void zend_do_throw(znode *expr TSRMLS_DC);
ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_table, HashTable *class_table, int compile_time);
void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce);
Please sign in to comment.
Something went wrong with that request. Please try again.