Improve internal pre-defined constant handling

Improved the way that internal pre-defined constants are managed.
Removed unused internal pre-defined constants.  Added code to
prevent an internal pre-defined constant (that was never
allocated) from being freed.
This commit is contained in:
Landon Curt Noll
2021-11-28 20:47:52 -08:00
parent 8f449ba6d2
commit 3d300acca1
6 changed files with 181 additions and 61 deletions

View File

@@ -2532,11 +2532,11 @@ zsrandom4(CONST ZVALUE seed, CONST ZVALUE ip, CONST ZVALUE iq, long trials)
/*
* search the 'p' and 'q' Blum prime (3 mod 4) candidates
*/
if (!znextcand(ip, trials, _zero_, zconst[3], zconst[4], &p)) {
if (!znextcand(ip, trials, _zero_, _three_, _four_, &p)) {
math_error("failed to find 1st Blum prime");
/*NOTREACHED*/
}
if (!znextcand(iq, trials, _zero_, zconst[3], zconst[4], &q)) {
if (!znextcand(iq, trials, _zero_, _three_, _four_, &q)) {
math_error("failed to find 2nd Blum prime");
/*NOTREACHED*/
}