Re: [PHP-DEV] [PATCH] Alias stream_context_get_default() as stream_context_set_default()

2008-08-16 Thread Hannes Magnusson
On Thu, Aug 7, 2008 at 03:42, Davey Shafik [EMAIL PROTECTED] wrote: oops, patch is still at: http://pixelated-dreams.com/~davey/stream_context_set_default.patch Committed. Care to write the docs for it too? :) -Hannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe,

Re: [PHP-DEV] [PATCH] Alias stream_context_get_default() as stream_context_set_default()

2008-08-06 Thread Hannes Magnusson
On Wed, Aug 6, 2008 at 06:24, Davey Shafik [EMAIL PROTECTED] 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

Re: [PHP-DEV] [PATCH] Alias stream_context_get_default() as stream_context_set_default()

2008-08-06 Thread Davey Shafik
On Aug 6, 2008, at 03:47 AM, Hannes Magnusson wrote: On Wed, Aug 6, 2008 at 06:24, Davey Shafik [EMAIL PROTECTED] 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

Re: [PHP-DEV] [PATCH] Alias stream_context_get_default() as stream_context_set_default()

2008-08-06 Thread Hannes Magnusson
On Wed, Aug 6, 2008 at 15:11, Davey Shafik [EMAIL PROTECTED] wrote: On Aug 6, 2008, at 03:47 AM, Hannes Magnusson wrote: On Wed, Aug 6, 2008 at 06:24, Davey Shafik [EMAIL PROTECTED] wrote: OK, here's an attempt at a patch[1], I discussed it briefly with Johannes and he felt some discussion

Re: [PHP-DEV] [PATCH] Alias stream_context_get_default() as stream_context_set_default()

2008-08-06 Thread Davey Shafik
On Aug 6, 2008, at 11:38 AM, Hannes Magnusson wrote: On Wed, Aug 6, 2008 at 15:11, Davey Shafik [EMAIL PROTECTED] wrote: On Aug 6, 2008, at 03:47 AM, Hannes Magnusson wrote: On Wed, Aug 6, 2008 at 06:24, Davey Shafik [EMAIL PROTECTED] wrote: OK, here's an attempt at a patch[1], I discussed

Re: [PHP-DEV] [PATCH] Alias stream_context_get_default() as stream_context_set_default()

2008-08-06 Thread Davey Shafik
On Aug 6, 2008, at 11:38 AM, Hannes Magnusson wrote: On Wed, Aug 6, 2008 at 15:11, Davey Shafik [EMAIL PROTECTED] wrote: On Aug 6, 2008, at 03:47 AM, Hannes Magnusson wrote: On Wed, Aug 6, 2008 at 06:24, Davey Shafik [EMAIL PROTECTED] wrote: OK, here's an attempt at a patch[1], I

Re: [PHP-DEV] [PATCH] Alias stream_context_get_default() as stream_context_set_default()

2008-08-05 Thread Davey Shafik
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

Re: [PHP-DEV] [PATCH] Alias stream_context_get_default() as stream_context_set_default()

2008-08-05 Thread David Coallier
I had suggested a second optional argument that could be assigned the resource (context), and then return true. Though I still think that returning the resource is the best option. Runs and compiles fine from here. I like the idea too. Great first attempt :) -- Slan, David -- PHP

Re: [PHP-DEV] [PATCH] Alias stream_context_get_default() as stream_context_set_default()

2008-08-04 Thread Hannes Magnusson
On Mon, Aug 4, 2008 at 01:29, Davey Shafik [EMAIL PROTECTED] wrote: Hey, it has come to my attention that stream_context_get_default() is /grossly/ misnamed, considering that it can be used (and is the only way) to SET default options. It works more like ini_set() in that you pass in the

Re: [PHP-DEV] [PATCH] Alias stream_context_get_default() as stream_context_set_default()

2008-08-04 Thread Johannes Schlüter
On Mon, 2008-08-04 at 09:49 +0200, Hannes Magnusson wrote: On Mon, Aug 4, 2008 at 01:29, Davey Shafik [EMAIL PROTECTED] wrote: Hey, it has come to my attention that stream_context_get_default() is /grossly/ misnamed, considering [...] That doesn't really solve anything as the argument

Re: [PHP-DEV] [PATCH] Alias stream_context_get_default() as stream_context_set_default()

2008-08-04 Thread Hannes Magnusson
On Mon, Aug 4, 2008 at 13:02, Johannes Schlüter [EMAIL PROTECTED] wrote: On Mon, 2008-08-04 at 09:49 +0200, Hannes Magnusson wrote: On Mon, Aug 4, 2008 at 01:29, Davey Shafik [EMAIL PROTECTED] wrote: Hey, it has come to my attention that stream_context_get_default() is /grossly/

Re: [PHP-DEV] [PATCH] Alias stream_context_get_default() as stream_context_set_default()

2008-08-04 Thread Davey Shafik
I'll see if I can write this as a patch instead; I was trying for path of least resistance Should be a fun exercise for me! Will get to it tonight. - Davey On Mon, Aug 4, 2008 at 7:14 AM, Hannes Magnusson [EMAIL PROTECTED] wrote: On Mon, Aug 4, 2008 at 13:02, Johannes Schlüter [EMAIL

[PHP-DEV] [PATCH] Alias stream_context_get_default() as stream_context_set_default()

2008-08-03 Thread Davey Shafik
Hey, it has come to my attention that stream_context_get_default() is / grossly/ misnamed, considering that it can be used (and is the only way) to SET default options. It works more like ini_set() in that you pass in the new defaults and it returns the old. With the current name, it is as