Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39697 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76366 invoked from network); 6 Aug 2008 13:11:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Aug 2008 13:11:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=davey@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=davey@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 207.97.245.183 as permitted sender) X-PHP-List-Original-Sender: davey@php.net X-Host-Fingerprint: 207.97.245.183 smtp183.iad.emailsrvr.com Linux 2.4/2.6 Received: from [207.97.245.183] ([207.97.245.183:50988] helo=smtp183.iad.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 61/16-41960-D13A9984 for ; Wed, 06 Aug 2008 09:11:58 -0400 Received: from relay8.relay.iad.mlsrvr.com (localhost [127.0.0.1]) by relay8.relay.iad.mlsrvr.com (SMTP Server) with ESMTP id 307771D23AC; Wed, 6 Aug 2008 09:11:55 -0400 (EDT) Received: by relay8.relay.iad.mlsrvr.com (Authenticated sender: davey-AT-pixelated-dreams.com) with ESMTP id BE3BC1F2BD0; Wed, 6 Aug 2008 09:11:54 -0400 (EDT) To: Hannes Magnusson In-Reply-To: <7f3ed2c30808060047jb918049o8492b9c4bf58bd77@mail.gmail.com> References: <220AF877-747F-4BDB-8631-235B54ED2503@php.net> <7f3ed2c30808040049w7172205ey4ae460be4beabcee@mail.gmail.com> <1217847749.4175.27.camel@goldfinger.johannes.nop> <7f3ed2c30808040414y41f32ef6ka5a9396e027978d5@mail.gmail.com> <2A1FDF9D-4C69-433C-8187-6D3C8A1BA550@php.net> <7f3ed2c30808060047jb918049o8492b9c4bf58bd77@mail.gmail.com> Message-ID: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v928.1) Date: Wed, 6 Aug 2008 09:11:52 -0400 Cc: =?ISO-8859-1?Q?=22\=22Johannes_Schl=FCter\=22=22?= , internals@lists.php.net X-Mailer: Apple Mail (2.928.1) Subject: Re: [PHP-DEV] [PATCH] Alias stream_context_get_default() as stream_context_set_default() From: davey@php.net (Davey Shafik) On Aug 6, 2008, at 03:47 AM, Hannes Magnusson wrote: > On Wed, Aug 6, 2008 at 06:24, Davey Shafik 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 :) There is always a default context :) > >> [1] http://pixelated-dreams.com/~davey/stream_context_set_default.patch > > The arginfo is wrong, the parameter is required, not optional. I don't see this, but that's just me not knowing, I thought that anything following a | (pipe) was optional, otherwise it was implicitly required, how do you make an argument explicitly required if that is not the case? > > > + parse_context_options(context, params TSRMLS_CC); The patch has been update to fix the params/options mistake, Still at http://pixelated-dreams.com/~davey/stream_context_set_default.patch - Davey