Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24873 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37410 invoked by uid 1010); 22 Jul 2006 07:37:02 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 37395 invoked from network); 22 Jul 2006 07:37:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jul 2006 07:37:02 -0000 X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 209.142.136.132 msa2-mx.centurytel.net Linux 2.4/2.6 Received: from ([209.142.136.132:52464] helo=msa2-mx.centurytel.net) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 20/06-04178-D95D1C44 for ; Sat, 22 Jul 2006 03:37:02 -0400 Received: from pc1 (d26-144.rt-bras.wnvl.centurytel.net [69.179.153.144]) by msa2-mx.centurytel.net (8.13.6/8.13.6) with SMTP id k6M7awi6004216; Sat, 22 Jul 2006 02:36:58 -0500 Message-ID: <00d401c6ad61$9d235810$0201a8c0@pc1> To: , "Andrei Zmievski" References: <014e01c6acbe$680b1bc0$0201a8c0@pc1> <10845a340607210543lfe173abq2221a1c833c5d9e1@mail.gmail.com> <017701c6acc6$3a526be0$0201a8c0@pc1> Date: Sat, 22 Jul 2006 02:36:58 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Subject: Re: [PHP-DEV] [PATCH] array_combine is not binary-key safe From: php_lists@realplain.com ("Matt W") Hi Andrei, I see you applied my patch. However, the 5.2 code still isn't binary-key safe (you only changed the second occurrence of add_assoc_zval to the _ex version). Or was that intentional and you only want to change the behavior in 6? And you know 5.2's description is still wrong -- with "keys" at the end instead of "values"? :-) When you changed that part in HEAD last week, you also added a "the" -- "... as _the_ corresponding _values_" -- which was in my patch, if you want both branches *exactly* the same. :-P Matt P.S. The other patch you're talking about below... I think Richard Quadling said he'll do it. ----- Original Message ----- From: "Andrei Zmievski" Sent: Friday, July 21, 2006 > Yeah, that's probably a good idea. You can submit a patch if you > want. :) > > -Andrei > > > On Jul 21, 2006, at 6:04 AM, Matt W wrote: > > > Hi Richard, > > > > I think I've seen those instances that you're referring to. By > > fixed length > > string I assume you mean hard-coded "string_key". Yeah, I would > > think those > > should use add_assoc_*_ex() since the length is known (sizeof > > ("string_key") > > etc.) to save unnecessary strlen() calls. > > > > Unless compilers optimize the strlen("string_key") + 1 to a > > constant from > > the add_assoc_*() macro. But I wouldn't think that's the case...? :-/ > > > > > > Matt