Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77074 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99454 invoked from network); 5 Sep 2014 16:00:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Sep 2014 16:00:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=php_lists@realplain.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=php_lists@realplain.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain realplain.com does not designate 216.33.127.82 as permitted sender) X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 216.33.127.82 mta31.charter.net Solaris 10 1203 Received: from [216.33.127.82] ([216.33.127.82:40881] helo=mta31.charter.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 12/A3-12208-D1ED9045 for ; Fri, 05 Sep 2014 12:00:30 -0400 Received: from imp10 ([10.20.200.15]) by mta31.charter.net (InterMail vM.8.01.05.02 201-2260-151-103-20110920) with ESMTP id <20140905160027.MCUK6769.mta31.charter.net@imp10>; Fri, 5 Sep 2014 12:00:27 -0400 Received: from mtaout004.msg.strl.va.charter.net ([68.114.190.29]) by imp10 with smtp.charter.net id nU0T1o0020eWGlw05U0T5T; Fri, 05 Sep 2014 12:00:27 -0400 Received: from impout003 ([68.114.189.18]) by mtaout004.msg.strl.va.charter.net (InterMail vM.9.00.013.00 201-2473-140) with ESMTP id <20140905160027.QZFW13360.mtaout004.msg.strl.va.charter.net@impout003>; Fri, 5 Sep 2014 11:00:27 -0500 Received: from pc1 ([96.35.251.86]) by impout003 with charter.net id nU0S1o00P1sc0so01U0ShM; Fri, 05 Sep 2014 11:00:27 -0500 X-Authority-Analysis: v=2.1 cv=EslcrEsA c=1 sm=1 tr=0 a=Is5gsZaFXO8aPum+t7Tz+g==:117 a=Is5gsZaFXO8aPum+t7Tz+g==:17 a=hOpmn2quAAAA:8 a=WUgRJF_wMoEA:10 a=8nJEP1OIZ-IA:10 a=BCPeO_TGAAAA:8 a=BzwIDoQar45aZ3nsxZMA:9 a=wPNLvfGTeEIA:10 Message-ID: <82DDEFF351B5484A85DD56599B8E8988@pc1> To: , "Dmitry Stogov" Date: Fri, 5 Sep 2014 11:00:26 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Subject: zend_mm_small_size_to_bit From: php_lists@realplain.com ("Matt Wilmas") Hi Dmitry, all, I was looking through a few parts of the new MM last week (cool, thanks! I will try soon on my Windows XP), and wasn't sure about the function in the subject... This: /* higher set bit number (0->0, 1->1, 2->2, 4->3, 8->4, 127->7, 128->8 etc) */ static zend_always_inline int zend_mm_small_size_to_bit(int size) { #if defined(__GNUC__) return (__builtin_clz(size) ^ 0x1f) + 1; Will never return 0, right? (Against the comment...) That's OK I guess since, for now, it's only called with size >= 8. But in that case, this can be removed from the non-GCC version: if (size == 0) return 0; Shouldn't have just one version able to return 0? :-/ Unless I'm missing something! Let me know... Thanks, Matt