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

Function rKill

Singular/ipshell.cc:6173–6216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6171}
6172
6173void rKill(ring r)
6174{
6175 if ((r->ref<=0)&&(r->order!=NULL))
6176 {
6177#ifdef RDEBUG
6178 if (traceit &TRACE_SHOW_RINGS) Print("kill ring %lx\n",(long)r);
6179#endif
6180 int j;
6181 for (j=0;j<myynest;j++)
6182 {
6183 if (iiLocalRing[j]==r)
6184 {
6185 if (j==0) WarnS("killing the basering for level 0");
6186 iiLocalRing[j]=NULL;
6187 }
6188 }
6189// any variables depending on r ?
6190 while (r->idroot!=NULL)
6191 {
6192 r->idroot->lev=myynest; // avoid warning about kill global objects
6193 killhdl2(r->idroot,&(r->idroot),r);
6194 }
6195 if (r==currRing)
6196 {
6197 // all dependend stuff is done, clean global vars:
6198 if (sLastPrinted.RingDependend())
6199 {
6200 sLastPrinted.CleanUp();
6201 }
6202 //if ((myynest>0) && (iiRETURNEXPR.RingDependend()))
6203 //{
6204 // WerrorS("return value depends on local ring variable (export missing ?)");
6205 // iiRETURNEXPR.CleanUp();
6206 //}
6207 currRing=NULL;
6208 currRingHdl=NULL;
6209 }
6210
6211 /* nKillChar(r); will be called from inside of rDelete */
6212 rDelete(r);
6213 return;
6214 }
6215 rDecRefCnt(r);
6216}
6217
6218void rKill(idhdl h)
6219{

Callers 15

p2DeleteFunction · 0.85
s_internalDeleteFunction · 0.85
killhdl2Function · 0.85
CountedRefPtr_killFunction · 0.85
jiA_RINGFunction · 0.85
grammar.ccFile · 0.85
rSetHdlFunction · 0.85
ssiLink.ccFile · 0.85
ssiWriteRingFunction · 0.85
ssiOpenFunction · 0.85
ssiCloseFunction · 0.85
kstdFunction · 0.85

Calls 10

WarnSFunction · 0.85
killhdl2Function · 0.85
rDeleteFunction · 0.85
rDecRefCntFunction · 0.85
WarnFunction · 0.85
n_DeleteFunction · 0.85
rFindHdlFunction · 0.85
RingDependendMethod · 0.80
CleanUpMethod · 0.80
PrintFunction · 0.50

Tested by

no test coverage detected