Changeset 1112 for trunk/xcache/xc_utils.c
- Timestamp:
- 08/01/12 19:55:06 (10 months ago)
- File:
-
- 1 edited
-
trunk/xcache/xc_utils.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xcache/xc_utils.c
r1017 r1112 51 51 /* }}} */ 52 52 53 static int xc_apply_function(zend_function *zf, apply_func_t applyer TSRMLS_DC) /* {{{ */ 53 typedef struct { 54 apply_func_t applyer; 55 } xc_apply_func_info; 56 static int xc_apply_function(zend_function *zf, xc_apply_func_info *fi TSRMLS_DC) /* {{{ */ 54 57 { 55 58 switch (zf->type) { 56 59 case ZEND_USER_FUNCTION: 57 60 case ZEND_EVAL_CODE: 58 return applyer(&zf->op_array TSRMLS_CC);61 return fi->applyer(&zf->op_array TSRMLS_CC); 59 62 break; 60 63 … … 69 72 /* }}} */ 70 73 typedef struct { 71 apply_func_t applyer;74 xc_apply_func_info fi; 72 75 zend_class_entry *ce; 73 76 } xc_apply_method_info; … … 94 97 } 95 98 #endif 96 return xc_apply_function(zf, mi->applyerTSRMLS_CC);97 } 98 /* }}} */ 99 static int xc_apply_cest(xc_cest_t *cest, apply_func_t applyerTSRMLS_DC) /* {{{ */99 return xc_apply_function(zf, &mi->fi TSRMLS_CC); 100 } 101 /* }}} */ 102 static int xc_apply_cest(xc_cest_t *cest, xc_apply_func_info *fi TSRMLS_DC) /* {{{ */ 100 103 { 101 104 xc_apply_method_info mi; 102 105 103 mi. applyer = applyer;104 mi.ce = CestToCePtr(*cest);106 mi.fi = *fi; 107 mi.ce = CestToCePtr(*cest); 105 108 zend_hash_apply_with_argument(&(CestToCePtr(*cest)->function_table), (apply_func_arg_t) xc_apply_method, &mi TSRMLS_CC); 106 109 return 0; … … 109 112 int xc_apply_op_array(xc_compile_result_t *cr, apply_func_t applyer TSRMLS_DC) /* {{{ */ 110 113 { 111 zend_hash_apply_with_argument(cr->function_table, (apply_func_arg_t) xc_apply_function, (void *) applyer TSRMLS_CC); 112 zend_hash_apply_with_argument(cr->class_table, (apply_func_arg_t) xc_apply_cest, (void *) applyer TSRMLS_CC); 114 xc_apply_func_info fi; 115 fi.applyer = applyer; 116 zend_hash_apply_with_argument(cr->function_table, (apply_func_arg_t) xc_apply_function, &fi TSRMLS_CC); 117 zend_hash_apply_with_argument(cr->class_table, (apply_func_arg_t) xc_apply_cest, &fi TSRMLS_CC); 113 118 114 119 return applyer(cr->op_array TSRMLS_CC);
Note: See TracChangeset
for help on using the changeset viewer.

