chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH] Mark ##sys#check-exact obsolete and replace ca


From: Peter Bex
Subject: [Chicken-hackers] [PATCH] Mark ##sys#check-exact obsolete and replace calls with ##sys#check-fixnum
Date: Sun, 4 Aug 2019 14:19:55 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

Hi all,

As Kooda found out in #1631, there are still some left over uses from
CHICKEN 4 of the ##sys#check-exact procedure.  These are all wrong with
the full numeric tower: exact numbers can be complex numbers and rational
numbers as well, but the check procedure seems to be used for checking
indices into vectors and things like that.

The check is implemented using an unsafe check_exact call, which is even
worse because it will cause a segfault when passed a non-number immediate.

So, this patch marks the procedure deprecated and replaces the remaining
few uses in core by the equivalent new ##sys#check-fixnum or removed
them altogether because where it was used, it was often followed
by ##sys#check-range, which already does a fixnum type check.

It looks like there are still several eggs that use it, so we should
check all of them, my gut feeling is that they're all wrong.

Eggs using it:

- sequences
- object-evict
- srfi-1
- srfi-14
- srfi-18
- srfi-69
- vector-lib

These are only the eggs in svn.

Cheers,
Peter

Attachment: 0001-Mark-sys-check-exact-as-deprecated-and-replace-calls.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]