Changeset 9a6b5d8 in git
- Timestamp:
- Apr 1, 2003, 5:26:08 PM (21 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- aa7d1f4659603bbc6b039cd719319a80ba36900e
- Parents:
- 87d26115a86e30ac46b6a98bcf3476387cd6dac3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/NTLconvert.cc
r87d261 r9a6b5d8 1 /* $Id: NTLconvert.cc,v 1. 7 2003-02-14 15:53:26Singular Exp $ */1 /* $Id: NTLconvert.cc,v 1.8 2003-04-01 15:26:08 Singular Exp $ */ 2 2 #include <config.h> 3 3 … … 27 27 #include "NTLconvert.h" 28 28 29 #ifdef HAVE_OMALLOC 30 #define Alloc(L) omAlloc(L) 31 #define Free(A,L) omFreeSize(A,L) 32 #elif defined(USE_MEMUTIL) 33 #include "memutil.h" 34 #define Alloc(L) getBlock(L) 35 #define Free(A,L) freeBlock(A,L) 36 #else 37 #define Alloc(L) malloc(L) 38 #define Free(A,L) free(A) 39 #endif 29 40 //////////////////////////////////////////////////////////////////////////////// 30 41 // NAME: convertFacCF2NTLZZpX // … … 428 439 if (cf_stringtemp_l==0) 429 440 { 430 cf_stringtemp=(char *) omAlloc(1023);431 cf_stringtemp2=(char *) omAlloc(1023);441 cf_stringtemp=(char *)Alloc(1023); 442 cf_stringtemp2=(char *)Alloc(1023); 432 443 cf_stringtemp[0]='\0'; 433 444 cf_stringtemp2[0]='\0'; … … 473 484 if (l>=cf_stringtemp_l-2) 474 485 { 475 omFree(cf_stringtemp2);476 char *p=(char *) omAlloc(cf_stringtemp_l*2);486 Free(cf_stringtemp2,cf_stringtemp_l); 487 char *p=(char *)Alloc(cf_stringtemp_l*2); 477 488 memcpy(p,cf_stringtemp,cf_stringtemp_l); 489 Free(cf_stringtemp,cf_stringtemp_l); 478 490 cf_stringtemp_l*=2; 479 omFree(cf_stringtemp);480 491 cf_stringtemp=p; 481 cf_stringtemp2=(char *) omAlloc(cf_stringtemp_l);492 cf_stringtemp2=(char *)Alloc(cf_stringtemp_l); 482 493 } 483 494 cf_stringtemp[l-1]=dummy[0]; … … 558 569 gmp_val[0]=getmpi(i.coeff().getval()); 559 570 int l=mpz_sizeinbase(gmp_val,10)+2; 560 stringtemp=(char*) omAlloc(l);571 stringtemp=(char*)Alloc(l); 561 572 stringtemp=mpz_get_str(stringtemp,10,gmp_val); 562 573 conv(temp,stringtemp); 563 omFreeSize(stringtemp,l);574 Free(stringtemp,l); 564 575 565 576 //set the computed coefficient
Note: See TracChangeset
for help on using the changeset viewer.