Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39586 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3010 invoked from network); 3 Aug 2008 23:29:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Aug 2008 23:29:19 -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.193 as permitted sender) X-PHP-List-Original-Sender: davey@php.net X-Host-Fingerprint: 207.97.245.193 smtp193.iad.emailsrvr.com Linux 2.4/2.6 Received: from [207.97.245.193] ([207.97.245.193:54892] helo=smtp193.iad.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D6/68-50899-E4F36984 for ; Sun, 03 Aug 2008 19:29:19 -0400 Received: from relay9.relay.iad.mlsrvr.com (localhost [127.0.0.1]) by relay9.relay.iad.mlsrvr.com (SMTP Server) with ESMTP id BE6572B17AE for ; Sun, 3 Aug 2008 19:29:16 -0400 (EDT) Received: by relay9.relay.iad.mlsrvr.com (Authenticated sender: davey-AT-pixelated-dreams.com) with ESMTP id 8C3C1231275 for ; Sun, 3 Aug 2008 19:29:16 -0400 (EDT) Message-ID: <220AF877-747F-4BDB-8631-235B54ED2503@php.net> To: internals@lists.php.net Content-Type: multipart/mixed; boundary=Apple-Mail-17--1019212596 Mime-Version: 1.0 (Apple Message framework v928.1) Date: Sun, 3 Aug 2008 19:29:15 -0400 X-Mailer: Apple Mail (2.928.1) Subject: [PATCH] Alias stream_context_get_default() as stream_context_set_default() From: davey@php.net (Davey Shafik) --Apple-Mail-17--1019212596 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit 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 bad as if we added an optional argument to ini_get() that would also set the value. I know we're already into PHP 5.3 alpha, but this is a simple alias, so I'm hoping you can squeeze it in. If not, I understand, and will leave that decision to the RM :) - Davey --Apple-Mail-17--1019212596 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit If the patch for some reason doesn't come through, I include it below, it's simple enough: Index: ext/standard/basic_functions.c =================================================================== RCS file: /repository/php-src/ext/standard/basic_functions.c,v retrieving revision 1.725.2.31.2.64.2.45 diff -u -u -r1.725.2.31.2.64.2.45 basic_functions.c --- ext/standard/basic_functions.c 3 Aug 2008 12:15:55 -0000 1.725.2.31.2.64.2.45 +++ ext/standard/basic_functions.c 3 Aug 2008 21:52:20 -0000 @@ -3510,6 +3510,7 @@ PHP_FE(stream_context_set_option, arginfo_stream_context_set_option) PHP_FE(stream_context_get_options, arginfo_stream_context_get_options) PHP_FE(stream_context_get_default, arginfo_stream_context_get_default) + PHP_FALIAS(stream_context_set_default, stream_context_get_default, arginfo_stream_context_get_default) PHP_FE(stream_filter_prepend, arginfo_stream_filter_prepend) PHP_FE(stream_filter_append, arginfo_stream_filter_append) PHP_FE(stream_filter_remove, arginfo_stream_filter_remove) --Apple-Mail-17--1019212596--