Changeset 6ac003 in git


Ignore:
Timestamp:
Nov 9, 2012, 2:14:39 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
a2da9ea07b27576399fa96413ca380533784bd58
Parents:
e0c0a7d767e7963785151c5a84d9afbc805dd263
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2012-11-09 14:14:39+01:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2012-11-09 14:40:33+01:00
Message:
fix: ntInit(p,...) in char p
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/ext_fields/transext.cc

    re0c0a7 r6ac003  
    528528number ntInit(long i, const coeffs cf)
    529529{
    530   if (i == 0) return NULL;
    531   else
    532   {
    533     fraction result = (fraction)omAlloc0Bin(fractionObjectBin);
    534     NUM(result) = p_ISet(i, ntRing);
    535     //DEN(result) = NULL; // done by omAlloc0Bin
    536     //COM(result) = 0; // done by omAlloc0Bin
    537     ntTest((number)result);
    538     return (number)result;
    539   }
     530  if (i != 0)
     531  {
     532    poly p=p_ISet(i, ntRing);
     533    if (p!=NULL)
     534    {
     535      fraction result = (fraction)omAlloc0Bin(fractionObjectBin);
     536      NUM(result) = p;
     537      //DEN(result) = NULL; // done by omAlloc0Bin
     538      //COM(result) = 0; // done by omAlloc0Bin
     539      ntTest((number)result);
     540      return (number)result;
     541    }
     542  }
     543  return NULL;
    540544}
    541545
     
    544548number ntInit(poly p, const coeffs cf)
    545549{
    546   if (p == 0) return NULL;
     550  if (p == NULL) return NULL;
    547551
    548552    number g;
Note: See TracChangeset for help on using the changeset viewer.