Re: [PATCH] Alias stream_context_get_default() as stream_context_set_default()
| From: | Hannes Magnusson | Date: | Wed, 06 Aug 2008 07:47:13 +0000 |
| Subject: | Re: [PATCH] Alias stream_context_get_default() as stream_context_set_default() | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-39691@lists.php.net to get a copy of this message | ||
On Wed, Aug 6, 2008 at 06:24, Davey Shafik <davey@php.net> wrote:
> OK, here's an attempt at a patch[1], I discussed it briefly with Johannes
> and he felt some discussion was needed with regards to the return value.
>
> I personally seem some benefit to returning the "new" context; Johannes
> wasn't sure that returning "true" might not be a better option in that we
> cannot return the previous "value" like ini_set().
Why can't we?
If there was a default context then return it, otherwise true/false..
Hmh. That could be confusing.
I'm fine returning the new context :)
> [1]
> http://pixelated-dreams.com/~davey/stream_context_set_default.patch
The arginfo is wrong, the parameter is required, not optional.
+ parse_context_options(context, params TSRMLS_CC);
params? Shouldn't this be options? :)
-Hannes