1 /* 2 Copyright (C) 2017 Daniel Schultz 3 4 This file is part of FLINT. 5 6 FLINT is free software: you can redistribute it and/or modify it under 7 the terms of the GNU Lesser General Public License (LGPL) as published 8 by the Free Software Foundation; either version 2.1 of the License, or 9 (at your option) any later version. See <http://www.gnu.org/licenses/>. 10 */ 11 12 #include "mpoly.h" 13 mpoly_zipinfo_init(mpoly_zipinfo_t zinfo,slong nvars)14void mpoly_zipinfo_init(mpoly_zipinfo_t zinfo, slong nvars) 15 { 16 zinfo->nvars = nvars; 17 zinfo->Adegs = (slong *) flint_malloc(nvars*sizeof(slong)); 18 zinfo->Bdegs = (slong *) flint_malloc(nvars*sizeof(slong)); 19 zinfo->perm = (slong *) flint_malloc(nvars*sizeof(slong)); 20 } 21 mpoly_zipinfo_clear(mpoly_zipinfo_t zinfo)22void mpoly_zipinfo_clear(mpoly_zipinfo_t zinfo) 23 { 24 flint_free(zinfo->Adegs); 25 flint_free(zinfo->Bdegs); 26 flint_free(zinfo->perm); 27 } 28