Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64101 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93361 invoked from network); 29 Nov 2012 13:28:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Nov 2012 13:28:17 -0000 Authentication-Results: pb1.pair.com header.from=dragoonis@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dragoonis@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.170 as permitted sender) X-PHP-List-Original-Sender: dragoonis@gmail.com X-Host-Fingerprint: 209.85.210.170 mail-ia0-f170.google.com Received: from [209.85.210.170] ([209.85.210.170:56961] helo=mail-ia0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/82-08727-0F267B05 for ; Thu, 29 Nov 2012 08:28:16 -0500 Received: by mail-ia0-f170.google.com with SMTP id x24so11971499iak.29 for ; Thu, 29 Nov 2012 05:28:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=4lZPI2u17dQp+FmriNHgzvBGRR1bjMUnzK+Gf8vbP88=; b=PBNFkzPqmuopcvHSgZv/ZWAcC7y7bY0+JeujKTXq/D9b3mVnqaw7/5Xv9STNKRr/m/ z9wAGRkne3hx5jxqvr7NOGBqOuyz0vq5YhlRN/DdUpBYE6SyJRBtbASHelKCv9At2IEx eIt3BNe7RzALvNcy86WR3y2iMAiuUHCa5QCDhrTeRvaCPeKiwd08i4uKezlybn3antmw 6Cb9n/S/MerqgBWoS/k1UPSf5aJj3QLDYxMTIL9fuCezwsGyANZm9CXERZG9o4ISD9UE LYDvxkTOetO2+UyYA3kk519X++eTNuuozhmhIwQLPjUgWS/ILOuheXkx2TypswrW4Uyq TZgg== MIME-Version: 1.0 Received: by 10.50.42.232 with SMTP id r8mr23026764igl.18.1354195694475; Thu, 29 Nov 2012 05:28:14 -0800 (PST) Received: by 10.64.12.45 with HTTP; Thu, 29 Nov 2012 05:28:14 -0800 (PST) In-Reply-To: References: Date: Thu, 29 Nov 2012 13:28:14 +0000 Message-ID: To: Rafael Dohms Cc: PHP internals Content-Type: multipart/alternative; boundary=14dae9340a0953586e04cfa24101 Subject: Re: [PHP-DEV] SplDoublyLinkedList missing insertBefore/After From: dragoonis@gmail.com (Paul Dragoonis) --14dae9340a0953586e04cfa24101 Content-Type: text/plain; charset=ISO-8859-1 Hi Rafael, I have worked on this code before and if the idea is accepted I'm happy to add features to this class. Let me know. Thanks, Paul. On Thu, Nov 29, 2012 at 11:38 AM, Rafael Dohms wrote: > I have just noticed that the current SPL inplementation of a > DoublyLinkedList does not include methods to insert nodes into the middle > of the list (insertBefore, insertAfter). > > After mentioning it I ran into a few people and other outbursts on the > internet of more people who saw this and complained about it. > > I found a bug from 2009 (https://bugs.php.net/bug.php?id=48358) which > mentions the case and has no Core response at all. > > I ask two questions: > > 1) Why was this bug never replied to, is there some reason these methods > should not be implemented? > > 2) Is anyone willing to put up a patch for this? I imagine that if you are > familiar with C and PHP source this is a quick implementation as its > standard logic documented everywhere. > > I'm not familiar enough with the PHP source to do this myself, hence I'm > asking for anyone willing to "champion" the patch. > > Thanks! > > -- > Rafael Dohms > PHP Evangelist and Community Leader > http://www.rafaeldohms.com.br > http://www.amsterdamphp.nl > --14dae9340a0953586e04cfa24101--