PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Structures » Structures_LinkedList » Bug #9484

_getTailNode scoped incorrectly

Details

Submitted2006-11-28 05:22 UTC
Fromevilfemme at hotmail dot com
Assigneddbs
StatusClosed
PackageStructures_LinkedList
PHP VersionIrrelevant
Roadmaps(Not assigned)

Comments

[2006-11-28 05:22 UTC] evilfemme at hotmail dot com

Description:
------------
private function _getTailNode()

In both the single and double files, the _getTailNode function is private, where it should be protected.

As private, it prevents overloading, such that a double list is accessing the single lists tail node function. This slows appending down seriously, basically appending in a double list is of the same efficiency as with a single (not at all).

Change lines 256 of Single.php, and line 232 of Double.php to:
protected function _getTailNode()

[2006-11-28 16:37 UTC] dbs at php dot net

Nice catch! I will update it momentarily :)

[2006-11-28 16:43 UTC] dbs at php dot net

This bug has been fixed in CVS.

If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.