7 messages in ru.sysoev.nginxRe: some extensions for nginx
FromSent OnAttachments
Manlio PerilloAug 21, 2007 4:04 am 
Manlio PerilloAug 21, 2007 4:15 am 
Igor SysoevAug 21, 2007 4:25 am 
Manlio PerilloAug 21, 2007 4:33 am 
Igor SysoevAug 21, 2007 5:02 am 
Manlio PerilloAug 21, 2007 6:21 am 
Igor SysoevAug 21, 2007 6:47 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: some extensions for nginxActions...
From:Manlio Perillo (manl@public.gmane.org)
Date:Aug 21, 2007 4:33:27 am
List:ru.sysoev.nginx

Igor Sysoev ha scritto:

On Tue, Aug 21, 2007 at 01:15:25PM +0200, Manlio Perillo wrote:

Hi Igor.

I have wrote some reusable functions for dealing with "foreign" C libraries.

You can find the code here: http://hg.mperillo.ath.cx/nginx/mod_wsgi/file/tip/ngx_ext.c

I have a question: should I deallocate the memory for the "original" string?

If allocation is made from a pool, then you do not need to free it.

How are they freed? With a garbage collector?

BTW, in ngx_conf_set_c_str_slot() value[1].data points to already zero-terminated string, so you do not need to reallocated it.

Ok, thanks. Does all ngx_str_t strings have an '\0' at the end of the data buffer?

If this is the case, I have written the code for nothing....