Changeset 1201 for trunk/processor/head.m4
- Timestamp:
- 2012-12-17T14:22:49+01:00 (6 months ago)
- File:
-
- 1 edited
-
trunk/processor/head.m4 (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/processor/head.m4
r1135 r1201 89 89 struct _xc_processor_t { 90 90 char *p; 91 zend_uint size;91 size_t size; 92 92 HashTable strings; 93 93 HashTable zvalptrs; … … 159 159 #endif 160 160 /* {{{ xc_zstrlen_char */ 161 static inline int xc_zstrlen_char(const_zstr s)161 static inline size_t xc_zstrlen_char(const_zstr s) 162 162 { 163 163 return strlen(ZSTR_S(s)); … … 166 166 #ifdef IS_UNICODE 167 167 /* {{{ xc_zstrlen_uchar */ 168 static inline int xc_zstrlen_uchar(zstr s)168 static inline size_t xc_zstrlen_uchar(zstr s) 169 169 { 170 170 return u_strlen(ZSTR_U(s)); … … 172 172 /* }}} */ 173 173 /* {{{ xc_zstrlen */ 174 static inline int xc_zstrlen(int type, const_zstr s)174 static inline size_t xc_zstrlen(int type, const_zstr s) 175 175 { 176 176 return type == IS_UNICODE ? xc_zstrlen_uchar(s) : xc_zstrlen_char(s); … … 192 192 static inline void xc_calc_string_n(xc_processor_t *processor, zend_uchar type, const_zstr str, long size IFAUTOCHECK(`, int relayline')) { 193 193 pushdef(`__LINE__', `relayline') 194 int realsize = UNISW(size, (type == IS_UNICODE) ? UBYTES(size) : size);194 size_t realsize = UNISW(size, (type == IS_UNICODE) ? UBYTES(size) : size); 195 195 long dummy = 1; 196 196 … … 198 198 ALLOC(, char, realsize) 199 199 } 200 else if (zend_u_hash_add(&processor->strings, type, str, size, (void *) &dummy, sizeof(dummy), NULL) == SUCCESS) {200 else if (zend_u_hash_add(&processor->strings, type, str, (uint) size, (void *) &dummy, sizeof(dummy), NULL) == SUCCESS) { 201 201 /* new string */ 202 202 ALLOC(, char, realsize) … … 214 214 static inline zstr xc_store_string_n(xc_processor_t *processor, zend_uchar type, const_zstr str, long size IFAUTOCHECK(`, int relayline')) { 215 215 pushdef(`__LINE__', `relayline') 216 int realsize = UNISW(size, (type == IS_UNICODE) ? UBYTES(size) : size);216 size_t realsize = UNISW(size, (type == IS_UNICODE) ? UBYTES(size) : size); 217 217 zstr ret, *pret; 218 218 … … 223 223 } 224 224 225 if (zend_u_hash_find(&processor->strings, type, str, size, (void **) &pret) == SUCCESS) {225 if (zend_u_hash_find(&processor->strings, type, str, (uint) size, (void **) &pret) == SUCCESS) { 226 226 return *pret; 227 227 } … … 230 230 ALLOC(ZSTR_V(ret), char, realsize) 231 231 memcpy(ZSTR_V(ret), ZSTR_V(str), realsize); 232 zend_u_hash_add(&processor->strings, type, str, size, (void *) &ret, sizeof(zstr), NULL);232 zend_u_hash_add(&processor->strings, type, str, (uint) size, (void *) &ret, sizeof(zstr), NULL); 233 233 return ret; 234 234 … … 239 239 * return class_index + 1 240 240 */ 241 static zend_u longxc_get_class_num(xc_processor_t *processor, zend_class_entry *ce) {242 zend_u longi;241 static zend_uint xc_get_class_num(xc_processor_t *processor, zend_class_entry *ce) { 242 zend_uint i; 243 243 const xc_entry_data_php_t *php = processor->php_src; 244 244 zend_class_entry *ceptr; … … 357 357 /* {{{ field name checker */ 358 358 IFAUTOCHECK(`dnl 359 static int xc_check_names(const char *file, int line, const char *functionName, const char **assert_names, int assert_names_count, HashTable *done_names)359 static int xc_check_names(const char *file, int line, const char *functionName, const char **assert_names, size_t assert_names_count, HashTable *done_names) 360 360 { 361 361 int errors = 0; 362 362 if (assert_names_count) { 363 int i;363 size_t i; 364 364 Bucket *b; 365 365 366 366 for (i = 0; i < assert_names_count; ++i) { 367 if (!zend_u_hash_exists(done_names, IS_STRING, assert_names[i], strlen(assert_names[i]) + 1)) {367 if (!zend_u_hash_exists(done_names, IS_STRING, assert_names[i], (uint) strlen(assert_names[i]) + 1)) { 368 368 fprintf(stderr 369 369 , "Error: missing field at %s `#'%d %s`' : %s\n"
Note: See TracChangeset
for help on using the changeset viewer.

