Here's the patch. At the moment my clear() method clones the functionality of count() just as a prototype to get things working before i make it do the actual clear functionality.
Patch attached to this email, made using 'svn diff' - Paul Dragoonis. On Sun, Jan 8, 2012 at 4:38 PM, Etienne Kneuss <col...@php.net> wrote: > Hi Paul, > > On Sun, Jan 8, 2012 at 16:32, Paul Dragoonis <dragoo...@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
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php