Opened 12 years ago

Closed 8 years ago

#839 closed defect (fixed)

lzma egg uses deprecated null-pointer? procedure

Reported by: sjamaan Owned by: Alaric Snell-Pym
Priority: minor Milestone:
Component: extensions Version: 4.7.x
Keywords: Cc:
Estimated difficulty: easy

Description

This was found by Mario's scrutiny/specialization run of Salmonella, see http://parenteses.org/mario/misc/specialize-report/install/lzma.html

Attached is a patch that changes the check for null-pointer? to one for #f; c-pointer never returned null-pointer objects anyway, it has always returned #f for NULL pointers AFAIK so I guess this has always been a bug in this egg. While I was writing the patch I noticed an unneccessary begin inside a let (which always has an implicit begin), so I removed that. Then I saw I had a (let ((x ...)) (and x (let ((y ...)) ...))) pattern, which can be simplified to your favorite macro, and-let*. So here's a patch that does that! :)

PS: I wasn't able to test this because in pkgsrc, archivers/lzmalib conflicts with archivers/xz, which is used by graphics/tiff and www/links-gui; graphics/tiff is of course used by lots and lots of packages like print/ghostscript and even editors/emacs! Perhaps it's an idea to change your egg to use archivers/xz instead? It's clearly the more popular of the LZMA libraries...

Attachments (1)

null-pointer-removal-and-simplification.patch (1.3 KB) - added by sjamaan 12 years ago.
Remove deprecated null-pointer? predicate and simplify code

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by sjamaan

Remove deprecated null-pointer? predicate and simplify code

comment:1 Changed 12 years ago by sjamaan

Owner: changed from alaricsp to Alaric Snell-Pym
Status: newassigned

comment:2 Changed 8 years ago by sjamaan

Estimated difficulty: easy

comment:3 Changed 8 years ago by Alaric Snell-Pym

Resolution: fixed
Status: assignedclosed

Applied in SVN r33595.

Note: See TracTickets for help on using tickets.