Changeset 1112
- Timestamp:
- 08/01/2012 07:55:06 PM (10 months ago)
- Location:
- trunk
- Files:
-
- 6 modified
-
devel/run (modified) (2 diffs)
-
mod_decoder/xc_decoder.c (modified) (1 diff)
-
mod_encoder/xc_encoder.c (modified) (1 diff)
-
mod_optimizer/xc_optimizer.c (modified) (1 diff)
-
processor/struct.m4 (modified) (2 diffs)
-
xcache/xc_utils.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/devel/run
r1103 r1112 10 10 if [[ $# -gt 0 ]]; then 11 11 args=("$@") 12 elif [[ $type = "make" ]]; then 13 args=() 12 14 fi 13 15 fi … … 142 144 phpize --clean \ 143 145 && phpize \ 144 && CFLAGS="-g -O0 - Wall -Wno-unused -W -Wshadow -Werror=implicit-function-declaration -std=c89 -D_GNU_SOURCE -D_POSIX_SOURCE -Dinline=" ./configure \146 && CFLAGS="-g -O0 -pedantic-errors -Wno-variadic-macros -Wno-long-long -Wall -Wno-unused -W -Wshadow -Werror=implicit-function-declaration -std=c89 -D_GNU_SOURCE -D_POSIX_SOURCE -Dinline=" ./configure \ 145 147 --enable-xcache-cacher \ 146 148 --enable-xcache-optimizer \ -
trunk/mod_decoder/xc_decoder.c
r1003 r1112 1 static char dummy = 1; -
trunk/mod_encoder/xc_encoder.c
r1003 r1112 1 static char dummy = 1; -
trunk/mod_optimizer/xc_optimizer.c
r1047 r1112 141 141 /* {{{ op_flowinfo helper func */ 142 142 enum { 143 XC_OPNUM_INVALID = -1 ,143 XC_OPNUM_INVALID = -1 144 144 }; 145 145 typedef struct { -
trunk/processor/struct.m4
r1049 r1112 47 47 int xc_autocheck_assert_size = SIZEOF_$1, assert_count = COUNTOF_$1; 48 48 int xc_autocheck_done_size = 0, xc_autocheck_done_count = 0; 49 const char *xc_autocheck_assert_names[] = { ifdef(`ELEMENTSOF_$1', `ELEMENTSOF_$1') }; 49 ifdef(`ELEMENTSOF_$1', ` 50 const char *xc_autocheck_assert_names[] = { ELEMENTSOF_$1 }; 51 size_t xc_autocheck_assert_names_count = sizeof(xc_autocheck_assert_names) / sizeof(xc_autocheck_assert_names[0]); 52 ', ` 53 const char **xc_autocheck_assert_names = NULL; 54 size_t xc_autocheck_assert_names_count = 0; 55 ') 50 56 zend_bool xc_autocheck_skip = 0; 51 57 HashTable xc_autocheck_done_names; … … 75 81 /* {{{ autocheck */ 76 82 if (!xc_autocheck_skip) { 77 int name_check_errors = xc_check_names(__FILE__, __LINE__, "FUNC_NAME", xc_autocheck_assert_names, sizeof(xc_autocheck_assert_names) / sizeof(xc_autocheck_assert_names[0]), &xc_autocheck_done_names);83 int name_check_errors = xc_check_names(__FILE__, __LINE__, "FUNC_NAME", xc_autocheck_assert_names, xc_autocheck_assert_names_count, &xc_autocheck_done_names); 78 84 79 85 if (xc_autocheck_done_count != assert_count) { -
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);

