chiark / gitweb /
math/limlee.c: Handle an abort from `pgen' correctly.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 14 Nov 2019 19:53:27 +0000 (19:53 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 16 Dec 2019 16:25:29 +0000 (16:25 +0000)
commite039785ff339715241e3db891b9dddc9e201768e
treeb183b98e60ee1c225f4bcad1a9de21e1c6e45207
parent8501f5f0126385c5c7fc58edd7a44dfd1c94ac6e
math/limlee.c: Handle an abort from `pgen' correctly.

The `llgen' function just tries again if `pgen' reports an abort.  This
is entirely contrary to the intend of the `PGEN_ABORT' protocol, so I've
no idea why I thought this was a good idea.

Instead, leave the prime slot null (because adding a return code to the
`pgen' callback breaks the API), and arrange for the caller to notice
and clean up.  This is annoyingly because there may be an `mpmul' in
progress.
math/limlee.c