cvs: pecl(APC_3_0) /apc apc_compile.c

From: Date: Fri, 02 May 2008 14:20:12 +0000
Subject: cvs: pecl(APC_3_0) /apc apc_compile.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-10687@lists.php.net to get a copy of this message
gopalv Fri May 2 14:20:12 2008 UTC Modified files: (Branch: APC_3_0) /pecl/apc apc_compile.c Log: fix build-warnings about const struct members http://cvs.php.net/viewvc.cgi/pecl/apc/apc_compile.c?r1=3.87.2.5&r2=3.87.2.6&diff_format=u Index: pecl/apc/apc_compile.c diff -u pecl/apc/apc_compile.c:3.87.2.5 pecl/apc/apc_compile.c:3.87.2.6 --- pecl/apc/apc_compile.c:3.87.2.5 Thu May 1 12:17:21 2008 +++ pecl/apc/apc_compile.c Fri May 2 14:20:12 2008 @@ -28,7 +28,7 @@ */ -/* $Id: apc_compile.c,v 3.87.2.5 2008/05/01 12:17:21 gopalv Exp $ */ +/* $Id: apc_compile.c,v 3.87.2.6 2008/05/02 14:20:12 gopalv Exp $ */ #include "apc_compile.h" #include "apc_globals.h" @@ -100,7 +100,7 @@ static znode* my_copy_znode(znode*, znode*, apc_malloc_t, apc_free_t); static zend_op* my_copy_zend_op(zend_op*, zend_op*, apc_malloc_t, apc_free_t); static zend_function* my_copy_function(zend_function*, zend_function*, apc_malloc_t, apc_free_t); -static zend_function_entry* my_copy_function_entry(zend_function_entry*, zend_function_entry*, apc_malloc_t, apc_free_t); +static zend_function_entry* my_copy_function_entry(zend_function_entry*, const zend_function_entry*, apc_malloc_t, apc_free_t); static zend_class_entry* my_copy_class_entry(zend_class_entry*, zend_class_entry*, apc_malloc_t, apc_free_t); static HashTable* my_copy_hashtable_ex(HashTable*, HashTable*, ht_copy_fun_t, ht_free_fun_t, int, apc_malloc_t, apc_free_t, ht_check_copy_fun_t, ...); #define my_copy_hashtable( dst, src, copy_fn, free_fn, holds_ptr, allocate, deallocate) \ @@ -108,8 +108,8 @@ static HashTable* my_copy_static_variables(zend_op_array* src, apc_malloc_t allocate, apc_free_t deallocate); #ifdef ZEND_ENGINE_2 static zend_property_info* my_copy_property_info(zend_property_info* dst, zend_property_info* src, apc_malloc_t allocate, apc_free_t deallocate); -static zend_arg_info* my_copy_arg_info_array(zend_arg_info*, zend_arg_info*, uint, apc_malloc_t, apc_free_t); -static zend_arg_info* my_copy_arg_info(zend_arg_info*, zend_arg_info*, apc_malloc_t, apc_free_t); +static zend_arg_info* my_copy_arg_info_array(zend_arg_info*, const zend_arg_info*, uint, apc_malloc_t, apc_free_t); +static zend_arg_info* my_copy_arg_info(zend_arg_info*, const zend_arg_info*, apc_malloc_t, apc_free_t); #endif /* * The "destroy" functions free the memory associated with a particular data @@ -305,8 +305,8 @@ *dst = dst_new; } - Z_SET_REFCOUNT_PP(dst, Z_REFCOUNT_PP(src)); - Z_SET_ISREF_TO_PP(dst, Z_ISREF_PP(src)); + Z_SET_REFCOUNT_PP(dst, Z_REFCOUNT_PP((zval**)src)); + Z_SET_ISREF_TO_PP(dst, Z_ISREF_PP((zval**)src)); return dst; } @@ -501,7 +501,7 @@ /* }}} */ /* {{{ my_copy_function_entry */ -static zend_function_entry* my_copy_function_entry(zend_function_entry* dst, zend_function_entry* src, apc_malloc_t allocate, apc_free_t deallocate) +static zend_function_entry* my_copy_function_entry(zend_function_entry* dst, const zend_function_entry* src, apc_malloc_t allocate, apc_free_t deallocate) { int local_dst_alloc = 0; assert(src != NULL); @@ -550,7 +550,7 @@ return dst; cleanup: - if(dst->fname) deallocate(dst->fname); + if(dst->fname) deallocate((char*)dst->fname); if(local_dst_alloc) deallocate(dst); return NULL; } @@ -629,7 +629,7 @@ /* }}} */ /* {{{ my_copy_arg_info_array */ -static zend_arg_info* my_copy_arg_info_array(zend_arg_info* dst, zend_arg_info* src, uint num_args, apc_malloc_t allocate, apc_free_t deallocate) +static zend_arg_info* my_copy_arg_info_array(zend_arg_info* dst, const zend_arg_info* src, uint num_args, apc_malloc_t allocate, apc_free_t deallocate) { int local_dst_alloc = 0; int i = 0; @@ -656,7 +656,7 @@ /* }}} */ /* {{{ my_copy_arg_info */ -static zend_arg_info* my_copy_arg_info(zend_arg_info* dst, zend_arg_info* src, apc_malloc_t allocate, apc_free_t deallocate) +static zend_arg_info* my_copy_arg_info(zend_arg_info* dst, const zend_arg_info* src, apc_malloc_t allocate, apc_free_t deallocate) { int local_dst_alloc = 0; @@ -690,8 +690,8 @@ return dst; cleanup: - if(dst->name) deallocate(dst->name); - if(dst->class_name) deallocate(dst->class_name); + if(dst->name) deallocate((char*)dst->name); + if(dst->class_name) deallocate((char*)dst->class_name); if(local_dst_alloc) deallocate(dst); return NULL; } @@ -881,12 +881,12 @@ for (i = 0; i < n; i++) { - if(!my_copy_function_entry(&dst->builtin_functions[i], + if(!my_copy_function_entry((zend_function_entry*)(&dst->builtin_functions[i]), &src->builtin_functions[i], allocate, deallocate)) { int ii; - for(ii=i-1; i>=0; i--) my_destroy_function_entry(&dst->builtin_functions[ii], deallocate); + for(ii=i-1; i>=0; i--) my_destroy_function_entry((zend_function_entry*)(&dst->builtin_functions[ii]), deallocate); goto cleanup; } } @@ -913,7 +913,7 @@ if(dst->refcount) deallocate(dst->refcount); #endif - if(dst->builtin_functions) deallocate(dst->builtin_functions); + if(dst->builtin_functions) deallocate((zend_function_entry*)dst->builtin_functions); if(dst->function_table.arBuckets) my_destroy_hashtable(&dst->function_table, (ht_free_fun_t) my_free_function, deallocate); if(dst->default_properties.arBuckets) my_destroy_hashtable(&dst->default_properties, (ht_free_fun_t) my_free_zval_ptr, deallocate); @@ -1712,10 +1712,10 @@ { assert(src != NULL); - deallocate(src->fname); + deallocate((char*)src->fname); #ifdef ZEND_ENGINE_2 if (src->arg_info) { - my_free_arg_info_array(src->arg_info, src->num_args, deallocate); + my_free_arg_info_array((zend_arg_info*)src->arg_info, src->num_args, deallocate); } #else if (src->func_arg_types) { @@ -1756,8 +1756,8 @@ { assert(src != NULL); - deallocate(src->name); - deallocate(src->class_name); + deallocate((char*)src->name); + deallocate((char*)src->class_name); } /* }}} */ #endif @@ -1807,9 +1807,9 @@ if (src->builtin_functions) { for (i = 0; src->builtin_functions[i].fname != NULL; i++) { - my_destroy_function_entry(&src->builtin_functions[i], deallocate); + my_destroy_function_entry((zend_function_entry*)(&src->builtin_functions[i]), deallocate); } - deallocate(src->builtin_functions); + deallocate((zend_function_entry*)src->builtin_functions); } } /* }}} */

« previous php.pecl.cvs (#10687) next »