You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Henry Jen <he...@ztune.net> on 2005/08/05 23:47:31 UTC

apr_pool_terminate

Hi,

The debug version of apr_poor_terminate does not support nested 
initialization as regular version, is this a bug or on purpose?

I guess it is a bug, but want to hear second opinion. :-)

Cheers,
Henry

Re: apr_pool_terminate

Posted by Henry Jen <he...@ztune.net>.
Branko Čibej wrote:
> Grrr.Sometimes I wish there was a "cancel post" option for e-mail as 
> well as news.
> 
> Just ignore me, I'm going through my stupid phase again.
> 

So, what about it? :-)

Cheers,
Henry

> 
>> Henry Jen wrote:
>>
>>> Henry Jen wrote:
>>>
>>>> Hi,
>>>>
>>>> The debug version of apr_poor_terminate does not support nested 
>>>> initialization as regular version, is this a bug or on purpose?
>>>>
>>>> I guess it is a bug, but want to hear second opinion. :-)
>>>>
>>>
>>>
>>> I guess no one would care if there is no patch available. So here is 
>>> a patch. :-)
>>
>>
>>
>> Yeah. Pity it's wrong...
>>
>>> Index: memory/unix/apr_pools.c
>>> ===================================================================
>>> --- memory/unix/apr_pools.c    (revision 230894)
>>> +++ memory/unix/apr_pools.c    (working copy)
>>> @@ -1264,7 +1264,8 @@
>>>     if (!apr_pools_initialized)
>>>         return;
>>>
>>> -    apr_pools_initialized = 0;
>>> +    if (--apr_pools_initialized)
>>> +        return;
>>>  
>>>
>> Take a good look at what happens just before the line you changed.
> 
> 
> -- Brane
> 
> 


Re: apr_pool_terminate

Posted by Branko Čibej <br...@xbc.nu>.
Grrr.Sometimes I wish there was a "cancel post" option for e-mail as 
well as news.

Just ignore me, I'm going through my stupid phase again.

Branko Čibej wrote:

> Henry Jen wrote:
>
>> Henry Jen wrote:
>>
>>> Hi,
>>>
>>> The debug version of apr_poor_terminate does not support nested 
>>> initialization as regular version, is this a bug or on purpose?
>>>
>>> I guess it is a bug, but want to hear second opinion. :-)
>>>
>>
>>
>> I guess no one would care if there is no patch available. So here is 
>> a patch. :-)
>
>
> Yeah. Pity it's wrong...
>
>> Index: memory/unix/apr_pools.c
>> ===================================================================
>> --- memory/unix/apr_pools.c    (revision 230894)
>> +++ memory/unix/apr_pools.c    (working copy)
>> @@ -1264,7 +1264,8 @@
>>     if (!apr_pools_initialized)
>>         return;
>>
>> -    apr_pools_initialized = 0;
>> +    if (--apr_pools_initialized)
>> +        return;
>>  
>>
> Take a good look at what happens just before the line you changed.

-- Brane


Re: apr_pool_terminate

Posted by Branko Čibej <br...@xbc.nu>.
Henry Jen wrote:

> Henry Jen wrote:
>
>> Hi,
>>
>> The debug version of apr_poor_terminate does not support nested 
>> initialization as regular version, is this a bug or on purpose?
>>
>> I guess it is a bug, but want to hear second opinion. :-)
>>
>
>
> I guess no one would care if there is no patch available. So here is a 
> patch. :-)

Yeah. Pity it's wrong...

>Index: memory/unix/apr_pools.c
>===================================================================
>--- memory/unix/apr_pools.c	(revision 230894)
>+++ memory/unix/apr_pools.c	(working copy)
>@@ -1264,7 +1264,8 @@
>     if (!apr_pools_initialized)
>         return;
> 
>-    apr_pools_initialized = 0;
>+    if (--apr_pools_initialized)
>+        return;
>  
>
Take a good look at what happens just before the line you changed.

-- Brane


Re: apr_pool_terminate

Posted by Henry Jen <he...@ztune.net>.
Henry Jen wrote:
> Hi,
> 
> The debug version of apr_poor_terminate does not support nested 
> initialization as regular version, is this a bug or on purpose?
> 
> I guess it is a bug, but want to hear second opinion. :-)
> 


I guess no one would care if there is no patch available. So here is a 
patch. :-)

Cheers,
Henry