Changeset c7ae4d in git for Singular/ipconv.cc
- Timestamp:
- Aug 31, 2016, 12:30:31 AM (8 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- e180f5613c396d33aa3316cd450d3a1e80d69129
- Parents:
- 7e2307f3485ab92e550254c1212dafc2940b41ea
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ipconv.cc
r7e2307 rc7ae4d 185 185 } 186 186 number n=nInit((int)(long)data); 187 number2 nn=(number2)omAlloc(sizeof *nn);187 number2 nn=(number2)omAlloc(sizeof(*nn)); 188 188 nn->cf=currRing->cf; nn->cf->ref++; 189 189 nn->n=n; 190 190 return (void *)nn; 191 191 } 192 static void * iiI2CP(void *data) 193 { 194 if (currRing==NULL) 195 { 196 WerrorS("missing basering while converting int to Poly"); 197 return NULL; 198 } 199 poly n=pISet((int)(long)data); 200 poly2 nn=(poly2)omAlloc(sizeof(*nn)); 201 nn->cf=currRing; nn->cf->ref++; 202 nn->n=n; 203 return (void *)nn; 204 } 192 205 #endif 193 206 … … 222 235 number n=nMap((number)data,coeffs_BIGINT,currRing->cf); 223 236 n_Delete((number *)&data, coeffs_BIGINT); 224 number2 nn=(number2)omAlloc(sizeof *nn);237 number2 nn=(number2)omAlloc(sizeof(*nn)); 225 238 nn->cf=currRing->cf; nn->cf->ref++; 239 nn->n=n; 240 return (void*)nn; 241 } 242 static void * iiBI2CP(void *data) 243 { 244 if (currRing==NULL) 245 { 246 WerrorS("missing basering while converting bigint to Poly"); 247 return NULL; 248 } 249 nMapFunc nMap=n_SetMap(coeffs_BIGINT,currRing->cf); 250 if (nMap==NULL) 251 { 252 Werror("no conversion from bigint to %s",currRing->cf->cfCoeffString(currRing->cf)); 253 return NULL; 254 } 255 number n=nMap((number)data,coeffs_BIGINT,currRing->cf); 256 n_Delete((number *)&data, coeffs_BIGINT); 257 poly2 nn=(poly2)omAlloc(sizeof(*nn)); 258 nn->cf=currRing; nn->cf->ref++; 259 nn->n=pNSet(n); 260 return (void*)nn; 261 } 262 static void * iiP2CP(void *data) 263 { 264 poly2 nn=(poly2)omAlloc(sizeof(*nn)); 265 nn->cf=currRing; nn->cf->ref++; 266 nn->n=(poly)data; 226 267 return (void*)nn; 227 268 }
Note: See TracChangeset
for help on using the changeset viewer.