Re: strlen-like function for pointers? ptrlen?

2009-02-24 Thread Nelson Castillo
>> If it doesn't exist -- do you see something that could go wrong with a >> ptrlen function? Would upstream like it? > > There is only one possibility: Just try and propose it. Create such a > function for your part, send a patch and plain simply ask if people feel > that the function should move

Re: strlen-like function for pointers? ptrlen?

2009-02-24 Thread Bernd Petrovitsch
On Tue, 2009-02-24 at 20:24 +0800, Nelson Castillo wrote: > Hi there. > > Is there a strlen-like function for pointers? I have this code: > > struct ts_filter_api **api_r = api; > int count = 0; > /* find out how many filters we need to create */ > while (*api_r) { > count++; > api_r++; > } >

strlen-like function for pointers? ptrlen?

2009-02-24 Thread Nelson Castillo
Hi there. Is there a strlen-like function for pointers? I have this code: struct ts_filter_api **api_r = api; int count = 0; /* find out how many filters we need to create */ while (*api_r) { count++; api_r++; } and I would like to have it replaced with ptrlen(api); If it doesn't exist --