Ticket #4539: trac4539_lmul.patch

File trac4539_lmul.patch, 1.1 KB (added by AlexanderDreyer, 3 years ago)

fixes at least some segfault (updated patch) - needs main patch applied before

  • sage/rings/polynomial/multi_polynomial_libsingular.pyx

    # HG changeset patch
    # Parent 74c5beb6e8262be1a099c9cde142aaf43906472b
    
    diff --git a/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/sage/rings/polynomial/multi_polynomial_libsingular.pyx
    a b  
    188188from sage.rings.polynomial.multi_polynomial_ideal import MPolynomialIdeal 
    189189from sage.rings.polynomial.polydict import ETuple 
    190190 
     191# non-commutative imports 
     192from sage.rings.polynomial.plural import NCPolynomial_plural 
     193 
    191194# base ring imports 
    192195from sage.rings.finite_rings.finite_field_prime_modn import FiniteField_prime_modn 
    193196from sage.rings.rational cimport Rational 
     
    20752078            9/4*x - 3/4*y - 3/2 
    20762079        """ 
    20772080        # all currently implemented baser rings are commutative 
    2078         return right._rmul_(self) 
     2081        if PY_TYPE_CHECK(right, MPolynomial_libsingular) or PY_TYPE_CHECK(right, NCPolynomial_plural): 
     2082            return right._rmul_(self) 
     2083        return self._rmul_(right) 
    20792084         
    20802085    cpdef RingElement  _mul_(left, RingElement right): 
    20812086        """