Changeset 061ea67 in git


Ignore:
Timestamp:
Sep 10, 2013, 7:07:37 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
1b70fe982adba74b2d7a2f4766d7ec6d103a2cf2
Parents:
918ca09282483016057240878bd4a20cd2d7305f
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2013-09-10 19:07:37+02:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2013-09-10 19:09:02+02:00
Message:
fix: correct usage of ..Alloc0Bin..
File:
1 edited

Legend:

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

    r918ca0 r061ea67  
    355355  poly g = p_Copy(NUM(f), ntRing);
    356356  poly h = NULL; if (!DENIS1(f)) h = p_Copy(DEN(f), ntRing);
    357   fraction result = (fraction)omAlloc0Bin(fractionObjectBin);
     357  fraction result = (fraction)omAllocBin(fractionObjectBin);
    358358  NUM(result) = g;
    359359  DEN(result) = h;
     
    416416
    417417  NUM (result) = p_Copy (NUM (f), ntRing); // ???
    418   DEN (result) = NULL;
    419   COM (result) = 0;
     418  //DEN (result) = NULL; // done by ..Alloc0..
     419  //COM (result) = 0; // done by ..Alloc0..
    420420
    421421  ntTest((number)result);
     
    431431
    432432  fraction result = (fraction)omAlloc0Bin(fractionObjectBin);
    433   DEN (result)= NULL;
    434   COM (result)= 0;
     433  //DEN (result)= NULL; // done by ..Alloc0..
     434  //COM (result)= 0; // done by ..Alloc0..
    435435
    436436  if (IS0(a))
     
    597597  {
    598598     NUM(result) = p_NSet(n, A);
    599      DEN(result) = NULL;
     599     //DEN(result) = NULL; // done by ..Alloc0..
    600600     n_Delete(&den, C);
    601   } else
     601  }
     602  else
    602603  {
    603604     DEN(result) = p_NSet(den, A);
     
    606607  }
    607608
    608   COM(result) = 0;
     609  //COM(result) = 0; // done by ..Alloc0..
    609610
    610611  ntTest((number)result);
     
    676677  p_Normalize(p, ntRing);
    677678  NUM(f) = p;
    678   COM(f) = 0;
     679  //COM(f) = 0; // done by omAlloc0
    679680
    680681  //check_N((number)f,cf);
     
    819820  ntTest(d);
    820821
    821   if (IS0(d)) 
     822  if (IS0(d))
    822823  {
    823824    WerrorS("ringvar expected");
     
    840841
    841842  fraction fa = (fraction)a;
     843  fraction result = (fraction)omAlloc0Bin(fractionObjectBin);
    842844  if (DENIS1(fa))
    843845  {
    844      fraction result = (fraction)omAlloc0Bin(fractionObjectBin);
    845846     NUM(result) = p_Diff(NUM(fa),k,ntRing);
    846      DEN(result) = NULL;
     847     //DEN(result) = NULL; // done by ..Alloc0..
    847848     COM(result) = COM(fa);
    848849     //check_N((number)result,cf);
     
    850851  }
    851852
    852   fraction result = (fraction)omAlloc0Bin(fractionObjectBin);
    853853  poly fg = p_Mult_q(p_Copy(DEN(fa),ntRing),p_Diff(NUM(fa),k,ntRing),ntRing);
    854854  poly gf = p_Mult_q(p_Copy(NUM(fa),ntRing),p_Diff(DEN(fa),k,ntRing),ntRing);
     
    892892                                                   ntRing);
    893893
    894   fraction result = (fraction)omAlloc0Bin(fractionObjectBin);
     894  fraction result = (fraction)omAllocBin(fractionObjectBin);
    895895  NUM(result) = g;
    896896  DEN(result) = f;
     
    932932                                                   ntRing);
    933933
    934   fraction result = (fraction)omAlloc0Bin(fractionObjectBin);
     934  fraction result = (fraction)omAllocBin(fractionObjectBin);
    935935  NUM(result) = g;
    936936  DEN(result) = f;
     
    958958  if (g == NULL) return NULL; // may happen due to zero divisors???
    959959
    960   fraction result = (fraction)omAlloc0Bin(fractionObjectBin);
     960  fraction result = (fraction)omAllocBin(fractionObjectBin);
    961961
    962962  NUM(result) = g;
     
    17881788      if (p_IsOne(num_f, ntRing))
    17891789      {
    1790         DEN(result)=NULL;
     1790        //DEN(result)=NULL;// Alloc0
    17911791        COM(result) = 0;
    17921792        p_Delete(&num_f,ntRing);
     
    17941794    }
    17951795  }
    1796   else
    1797   {
    1798     DEN(result) = NULL;
    1799     COM(result) = 0;
    1800   }
     1796  //else// Alloc0
     1797  //{
     1798  //  DEN(result) = NULL;
     1799  //  COM(result) = 0;
     1800  //}
    18011801  ntTest((number)result); // !!!!
    18021802  //check_N((number)result,cf);
     
    18671867     h = prCopyR(DEN(f), rSrc, rDst);
    18681868
    1869   fraction result = (fraction)omAlloc0Bin(fractionObjectBin);
     1869  fraction result = (fraction)omAllocBin(fractionObjectBin);
    18701870
    18711871  NUM(result) = g;
     
    19161916  p_SetCoeff(p, n_Copy(a, src), dst->extRing);
    19171917  fraction f = (fraction)omAlloc0Bin(fractionObjectBin);
    1918   NUM(f) = p; DEN(f) = NULL; COM(f) = 0;
     1918  NUM(f) = p; // DEN(f) = NULL; COM(f) = 0;
    19191919  assume(n_Test((number)f, dst));
    19201920  //check_N((number)f,dst);
     
    19391939  p_SetCoeff(p, q, dst->extRing);
    19401940  fraction f = (fraction)omAlloc0Bin(fractionObjectBin);
    1941   NUM(f) = p; DEN(f) = NULL; COM(f) = 0;
     1941  NUM(f) = p; // DEN(f) = NULL; COM(f) = 0;
    19421942  assume(n_Test((number)f, dst));
    19431943  //check_N((number)f,dst);
     
    20802080  fraction f = (fraction)omAlloc0Bin(fractionObjectBin);
    20812081  NUM(f) = p;
    2082   DEN(f) = NULL;
    2083   COM(f) = 0;
     2082  //DEN(f) = NULL;
     2083  //COM(f) = 0;
    20842084
    20852085  ntTest((number)f);
Note: See TracChangeset for help on using the changeset viewer.