* (c) 2004 Straylight/Edgeware
*/
-/*----- Licensing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
*
* This file is part of Catacomb.
*
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
- *
+ *
* Catacomb is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Library General Public
* License along with Catacomb; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
static void fdestroy(field *ff) {
fctx_binpoly *f = (fctx_binpoly *)ff;
- gfreduce_destroy(&f->r);
+ gfreduce_destroy(&f->r); MP_DROP(f->f.q);
DESTROY(f);
}
f->f.noctets = (f->f.nbits + 7) >> 3;
gfreduce_create(&f->r, p);
f->f.m = f->r.p;
+ f->f.q = mp_lsl(MP_NEW, MP_ONE, f->f.nbits);
return (&f->f);
}
static void fndestroy(field *ff) {
fctx_binnorm *f = (fctx_binnorm *)ff; gfreduce_destroy(&f->f.r);
- gfn_destroy(&f->ntop); gfn_destroy(&f->pton);
+ gfn_destroy(&f->ntop); gfn_destroy(&f->pton); MP_DROP(f->f.f.q);
DESTROY(f);
}
f->f.f.noctets = (f->f.f.nbits + 7) >> 3;
gfreduce_create(&f->f.r, p);
f->f.f.m = f->f.r.p;
+ f->f.f.q = mp_lsl(MP_NEW, MP_ONE, f->f.f.nbits);
gfn_create(p, beta, &f->ntop, &f->pton);
return (&f->f.f);
}