Re: a simple formatter

2008-02-11 Thread Robert Collins
On Fri, 2008-02-08 at 23:26 +0200, Tsantilas Christos wrote: Alex Rousskov wrote: Changes in the current code are only bad for outstanding patches and forgotten branches, right? If everybody applies the same formatting to all their branches and HEAD, we should not have many conflicts,

Re: X-Vary-Options patch

2008-02-11 Thread Robert Collins
On Fri, 2008-02-08 at 16:26 +1100, Tim Starling wrote: The added features of the patch are conditional, and are enabled by the configure option --enable-vary-options. Unless there is non-trivial process required for regular vary headers with this enabled, I don't think it needs to be

Re: two xasserts in squid3

2008-02-11 Thread Alex Rousskov
On Mon, 2008-02-11 at 12:18 +0900, Adrian Chadd wrote: On Mon, Feb 11, 2008, Amos Jeffries wrote: That only because none has shown me a better way to do function pointers than the way squid currently does them. I'm pretty sure the async calls stuff has an implementation of this. There's

Re: two xasserts in squid3

2008-02-11 Thread Alex Rousskov
On Mon, 2008-02-11 at 10:15 +1300, Amos Jeffries wrote: I think a better approach to this would be: 1) do we actually need it anyway? Yes, we need a common assert-like macro. 2) where is it supposed to be defined? IMO: include/xassert.h if xassert is used outside of src/ src/xassert.h

Re: two xasserts in squid3

2008-02-11 Thread Robert Collins
On Tue, 2008-02-12 at 11:10 +1300, Amos Jeffries wrote: On Mon, 2008-02-11 at 09:33 +1100, Robert Collins wrote: One of the things I'd most love to see is the modularisation completed - complete deletion of protos.h, structs.h, typedefs.h. Yes, of course. That would be the focus of the

Re: two xasserts in squid3

2008-02-11 Thread Amos Jeffries
On Tue, 2008-02-12 at 10:37 +1300, Amos Jeffries wrote: When we get a better VCS, we should discuss moving include/ and lib/ stuff into src/ with the exception of 3rd party code. This would avoid problems created by that artificial boundary. What I have been mulling over after seeing code

Re: two xasserts in squid3

2008-02-11 Thread Amos Jeffries
On Mon, 2008-02-11 at 10:15 +1300, Amos Jeffries wrote: I think a better approach to this would be: 1) do we actually need it anyway? Yes, we need a common assert-like macro. 2) where is it supposed to be defined? IMO: include/xassert.h if xassert is used outside of src/

Re: two xasserts in squid3

2008-02-11 Thread Amos Jeffries
On Sun, 2008-02-10 at 20:51 +0200, Tsantilas Christos wrote: Maybe it was better if the files lib/assert.c and include/assert.h removed and the assert macro defined in squid.h file like squid2.6 does... It looks like Array, MemPool, and splay files are using assert outside of src/ so you

Re: two xasserts in squid3

2008-02-11 Thread Amos Jeffries
Alex Rousskov wrote: On Sun, 2008-02-10 at 20:51 +0200, Tsantilas Christos wrote: Maybe it was better if the files lib/assert.c and include/assert.h removed and the assert macro defined in squid.h file like squid2.6 does... It looks like Array, MemPool, and splay files are using assert

Re: two xasserts in squid3

2008-02-11 Thread Tsantilas Christos
Alex Rousskov wrote: On Sun, 2008-02-10 at 20:51 +0200, Tsantilas Christos wrote: Maybe it was better if the files lib/assert.c and include/assert.h removed and the assert macro defined in squid.h file like squid2.6 does... It looks like Array, MemPool, and splay files are using assert

Re: two xasserts in squid3

2008-02-11 Thread Alex Rousskov
On Sun, 2008-02-10 at 20:51 +0200, Tsantilas Christos wrote: Maybe it was better if the files lib/assert.c and include/assert.h removed and the assert macro defined in squid.h file like squid2.6 does... It looks like Array, MemPool, and splay files are using assert outside of src/ so you

Re: two xasserts in squid3

2008-02-11 Thread Alex Rousskov
On Mon, 2008-02-11 at 09:33 +1100, Robert Collins wrote: One of the things I'd most love to see is the modularisation completed - complete deletion of protos.h, structs.h, typedefs.h. Yes, of course. That would be the focus of the cleanup that Amos is volunteering to do :-) Alex.

Re: squid-3.HEAD IPAddress leak

2008-02-11 Thread Robert Collins
On Fri, 2008-02-08 at 12:14 +0900, Adrian Chadd wrote: Together they make a pretty tree. But every used piece is eseentially another new, memset, free. Ah, and here you will have problems. The members of that struct should probably be malloc, free, and not new/delete. You're using

squid3 future directory structure

2008-02-11 Thread Alex Rousskov
On Tue, 2008-02-12 at 11:19 +1300, Amos Jeffries wrote: On Tue, 2008-02-12 at 10:37 +1300, Amos Jeffries wrote: When we get a better VCS, we should discuss moving include/ and lib/ stuff into src/ with the exception of 3rd party code. This would avoid problems created by that artificial

Re: two xasserts in squid3

2008-02-11 Thread Alex Rousskov
On Tue, 2008-02-12 at 11:27 +1300, Amos Jeffries wrote: * Add automatic testing for header dependency - script to perform universal include unit-test for .h files - link to automatic unit-testing in each directory - fix the compile errors! I am thinking along

Re: two xasserts in squid3

2008-02-11 Thread Amos Jeffries
On Tue, 2008-02-12 at 11:10 +1300, Amos Jeffries wrote: On Mon, 2008-02-11 at 09:33 +1100, Robert Collins wrote: One of the things I'd most love to see is the modularisation completed - complete deletion of protos.h, structs.h, typedefs.h. Yes, of course. That would be the focus of