Changeset 6e5e20 in git


Ignore:
Timestamp:
Jun 27, 2000, 2:07:01 PM (24 years ago)
Author:
Wilfred Pohl <pohl@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
527ac8fed1f0865e3893374eefa5ab848c9fb0fa
Parents:
e80ff56d9a4fa8c9359e3fdd5d66f6093d5f54b8
Message:
memory bug fixed


git-svn-id: file:///usr/local/Singular/svn/trunk@4466 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/gnumpc.cc

    re80ff56 r6e5e20  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: gnumpc.cc,v 1.10 1999-11-15 17:20:03 obachman Exp $ */
     4/* $Id: gnumpc.cc,v 1.11 2000-06-27 12:07:00 pohl Exp $ */
    55/*
    66* ABSTRACT: computations with GMP complex floating-point numbers
     
    2626static number ngcMapQ(number from)
    2727{
    28   gmp_complex *res= new gmp_complex();
    2928  if ( from != NULL )
    3029  {
    31     *res= numberFieldToFloat(from,QTOF);
    32   }
    33   return (number)res;
     30    gmp_complex *res=new gmp_complex(numberFieldToFloat(from,QTOF));
     31    return (number)res;
     32  }
     33  else
     34    return NULL;
    3435}
    3536
     
    5758void ngcNew (number * r)
    5859{
    59   gmp_complex* n= new gmp_complex( );
    60   *r=(number)n;
     60  *r=NULL;
    6161}
    6262
  • Singular/gnumpfl.cc

    re80ff56 r6e5e20  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: gnumpfl.cc,v 1.13 2000-06-21 07:35:41 pohl Exp $ */
     4/* $Id: gnumpfl.cc,v 1.14 2000-06-27 12:07:01 pohl Exp $ */
    55/*
    66* ABSTRACT: computations with GMP floating-point numbers
     
    3434static number ngfMapQ(number from)
    3535{
    36   gmp_float *res= new gmp_float();
    3736  if ( from != NULL )
    3837  {
    39     *res= numberFieldToFloat(from,QTOF);
    40   }
    41   return (number)res;
     38    gmp_float *res=new gmp_float(numberFieldToFloat(from,QTOF));
     39    return (number)res;
     40  }
     41  else
     42    return NULL;
    4243}
    4344
Note: See TracChangeset for help on using the changeset viewer.