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

Function newstruct_Init

Singular/newstruct.cc:536–555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

534}
535
536void *newstruct_Init(blackbox *b)
537{
538 newstruct_desc n=(newstruct_desc)b->data;
539 lists l=(lists)omAlloc0Bin(slists_bin);
540 l->Init(n->size);
541 newstruct_member nm=n->member;
542 while (nm!=NULL)
543 {
544 l->m[nm->pos].rtyp=nm->typ;
545 if (NeedShadowRing(nm->typ))
546 {
547 l->m[nm->pos-1].rtyp=RING_CMD;
548 l->m[nm->pos-1].data=currRing; //idrecDataInit may create ringdep obj.
549 if (currRing!=NULL) rIncRefCnt(currRing);
550 }
551 l->m[nm->pos].data=idrecDataInit(nm->typ);
552 nm=nm->next;
553 }
554 return l;
555}
556
557BOOLEAN newstruct_CheckAssign(blackbox */*b*/, leftv L, leftv R)
558{

Callers

nothing calls this directly

Calls 5

omAlloc0BinFunction · 0.85
NeedShadowRingFunction · 0.85
rIncRefCntFunction · 0.85
idrecDataInitFunction · 0.85
InitMethod · 0.45

Tested by

no test coverage detected