Re: Fwd: SplDoublyLinkedList

From: Date: Sun, 08 Jan 2012 16:38:55 +0000
Subject: Re: Fwd: SplDoublyLinkedList
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-57272@lists.php.net to get a copy of this message
Hi Paul, On Sun, Jan 8, 2012 at 16:32, Paul Dragoonis <dragoonis@gmail.com> wrote: > Hey Internals, > > I'm trying to add a new method to SplDoublyLinkedList named "clear" > > I've successfully compiled please see the output: > > $dll = new \SplDoublyLinkedList(); > var_dump(get_class_methods($dll)); > array(23) { >  [0]=> >  string(5) "clear" > > > So my clear method is there, but as soon as i try to call it in the > code by doing: > $dll->clear(); > > I get: > Fatal error: Call to undefined function  new \SplDoublyLinkedList() in > - on line 2 > > Without the call to clear, the class works as normal. > > > Here are the 2 entries i've made: > SPL_ME(SplDoublyLinkedList, clear,           arginfo_dllist_void, >      ZEND_ACC_PUBLIC) > SPL_METHOD(SplDoublyLinkedList, clear) > { >    RETURN_TRUE; > } > > > Can someone help me out? Is that all the modifications you did to the code? If not, could you please attach a patch. I will take a look. Best, > > Thanks, > Paul Dragoonis. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Etienne Kneuss http://www.colder.ch

« previous php.internals (#57272) next »