Re: I don't understand apr_array_push

2011-01-26 Thread Jim Jagielski
On Jan 26, 2011, at 10:28 AM, Simone Caruso wrote: > > Now i need to read the array (i read mod_alias.c): >for(k = 0; k < reqc->aliases->nelts ; k++){ >alias = (alias_t *)&reqc->aliases->elts[k]; >isalias = alias_matches(r->uri, alia

Re: I don't understand apr_array_push

2011-01-26 Thread Sorin Manolache
In my opinion the problem is here: alias = (alias_t *)&reqc->aliases->elts[k]; Try alias = ((alias_t *)reqc->aliases->elts)[k]; S On Wed, Jan 26, 2011 at 16:28, Simone Caruso wrote: > Hi list, > > i can't understand the reason i can't read from an "apr array", my code is > like this: > >      

Re: I don't understand apr_array_push

2011-01-26 Thread Simone Caruso
On 26/01/2011 16:28, Simone Caruso wrote: Hi list, i can't understand the reason i can't read from an "apr array", my code is like this: //The 2 arrays, now working on reqc->aliases reqc->aliases = (apr_array_header_t *)apr_array_make(r->pool, 5, sizeof(alias_t)); reqc->redirects = (apr_array

I don't understand apr_array_push

2011-01-26 Thread Simone Caruso
Hi list, i can't understand the reason i can't read from an "apr array", my code is like this: //The 2 arrays, now working on reqc->aliases reqc->aliases = (apr_array_header_t *)apr_array_make(r->pool, 5, sizeof(alias_t)); reqc->redirects = (apr_array_header_t *