+/** @file euclid_gcd_wrap.h
+ *
+ * Euclidean GCD and supporting functions. */
+
+/*
+ * GiNaC Copyright (C) 1999-2020 Johannes Gutenberg University Mainz, Germany
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
#ifndef GINAC_PGCD_EUCLID_GCD_H
#define GINAC_PGCD_EUCLID_GCD_H
+
#include "upoly.h"
#include "gcd_euclid.h"
#include "smod_helpers.h"
#include "relational.h"
#include "debug.h"
-namespace GiNaC
-{
+namespace GiNaC {
static void ex2upoly(umodpoly& u, ex e, const ex& var, const long p)
{
const ex term = numeric(c)*power(var, i);
ev.push_back(term);
}
- ex ret = (new add(ev))->setflag(status_flags::dynallocated);
+ ex ret = dynallocate<add>(ev);
return ret;
}
} // namespace GiNaC
-#endif
+#endif // ndef GINAC_PGCD_EUCLID_GCD_H