MCPcopy Create free account
hub / github.com/Singular/Singular / n2Copy

Function n2Copy

Singular/number2.cc:449–463  ·  view source on GitHub ↗

----------------------------------------------------------- operations with Number/number2 -----------------------------------------------------------

Source from the content-addressed store, hash-verified

447// operations with Number/number2
448// -----------------------------------------------------------
449number2 n2Copy(const number2 d)
450{
451 number2 r=NULL;
452 if ((d!=NULL)&&(d->cf!=NULL))
453 {
454 r=(number2)omAlloc(sizeof(*r));
455 d->cf->ref++;
456 r->cf=d->cf;
457 if (d->cf!=NULL)
458 r->n=n_Copy(d->n,d->cf);
459 else
460 r->n=NULL;
461 }
462 return r;
463}
464void n2Delete(number2 &d)
465{
466 if (d!=NULL)

Callers 1

s_internalCopyFunction · 0.85

Calls 1

n_CopyFunction · 0.85

Tested by

no test coverage detected