Macaulay2 Engine
Loading...
Searching...
No Matches

◆ new_term()

Nterm * PolyRing::new_term ( ) const
protected

Definition at line 146 of file poly.cpp.

147{
148 Nterm *result = GETMEM(Nterm *, poly_size_);
149 result->next = nullptr;
150 result->coeff = 0; // This value is never used, one hopes...
151 // In fact, it gets used in the line below: K->remove(tmp->coeff);
152 // which is called from the line below: remove(idiotic);
153 // and it crashes there, because this assignment only sets the integer
154 // part of the union, so on a machine with 4 byte ints and 8 byte pointers,
155 // the
156 // pointer part is not NULL!
157 result->coeff.poly_val = nullptr; // so I added this line
158 return result;
159}
size_t poly_size_
Definition polyring.hpp:118
VALGRIND_MAKE_MEM_DEFINED & result(result)
#define GETMEM(T, size)

References GETMEM, PolynomialRing::poly_size_, and result().

Referenced by SkewPolynomialRing::antipode(), MatrixStream::appendTermDone(), copy_term(), ChineseRemainder::CRA(), diff(), divide_by_expvector(), divide_by_given_content(), divide_by_var(), division_algorithm(), from_int(), from_long(), from_rational(), fromCoefficient(), fromSmallIntegerCoefficients(), get_logical_coeff(), homogenize(), invert(), lead_term(), make_flat_term(), make_logical_term(), mult_by_term(), SkewPolynomialRing::mult_by_term(), negate(), power_direct(), powerseries_division_algorithm(), preferred_associate(), ChineseRemainder::ratConversion(), SchurRing::SM(), translate_gbvector_to_vec(), translate_gbvector_to_vec_QQ(), var(), vec_coefficient_of_var(), WeylAlgebra::weyl_diff(), and zeroize_tiny().