sapi_add_header_ex() violating CODING_STANDARDS
- From: ebgssth@xxxxxxxxx ("js ")
- Date: Tue, 3 Apr 2007 22:43:29 +0900
Hi list.
I don't think this is the right place to talk about this,
but writing PHP extensions I found that "sapi_add_header_ex()" in SAPI.c
is violating a law of PHP CODING_STANDARDS, which says
"[1] Functions that are given pointers to resources should not free them
*snip*
Exceptions:
- The function's designated behavior is freeing that resource. E.g. efree()
- The function is given a boolean argument, that controls whether or not
the function may free its arguments (if true - the function must free its
arguments, if false - it must not)
*snip*
"
Take a look at the source and you'll see the following code
if (!duplicate)
efree(header_line);
not so intuitive.
Is this a bug?
.
- Follow-Ups:
- Re: [PHP] sapi_add_header_ex() violating CODING_STANDARDS
- From: Jochem Maas
- Re: [PHP] sapi_add_header_ex() violating CODING_STANDARDS
- Prev by Date: Re: [PHP] php-mysql problem
- Next by Date: Re: [PHP] sapi_add_header_ex() violating CODING_STANDARDS
- Previous by thread: RE: [PHP] php-mysql problem
- Next by thread: Re: [PHP] sapi_add_header_ex() violating CODING_STANDARDS
- Index(es):
Relevant Pages
|