Changeset a04a05 in git for Singular/pyobject.cc


Ignore:
Timestamp:
Aug 1, 2012, 11:29:10 PM (11 years ago)
Author:
Alexander Dreyer <alexander.dreyer@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '1d362c315e551a5b527ab0759f8839cf0e94f3a5')
Children:
29fc84389b9713cdf07cc538bad5becf4758553e
Parents:
5ebd4bcf7ead1b205b12afeec0793f8bc29e16ec
Message:
chg: encapsulating newstruct's overloaded '=' and use in pyobject
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/pyobject.cc

    r5ebd4bc ra04a05  
    339339    }
    340340
     341    sleftv tmp;
     342    BOOLEAN newstruct_equal(int, leftv, leftv); // declaring overloaded '='
     343    if (!newstruct_equal(PythonInterpreter::id(), &tmp, value)) 
     344      return PythonCastStatic<>(&tmp);       
     345
    341346    if (typeId > MAX_TOK)       // custom types
    342347    {
    343348      blackbox *bbx = getBlackboxStuff(typeId);
    344       sleftv tmp;
    345       if (! bbx->blackbox_Op1(PythonInterpreter::id(), &tmp, value) )
    346         return PythonCastStatic<>(&tmp);
    347     }
    348     else
    349       Werror("type '%s` incompatible with 'pyobject`", iiTwoOps(typeId));
    350 
     349      assume(bbx != NULL);
     350      if (! bbx->blackbox_Op1(PythonInterpreter::id(), &tmp, value))
     351        return PythonCastStatic<>(&tmp);       
     352    }
     353
     354    Werror("type '%s` incompatible with 'pyobject`", iiTwoOps(typeId));
    351355    return PythonObject();
    352356  }
Note: See TracChangeset for help on using the changeset viewer.