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

Method Data

Singular/subexpr.cc:1192–1503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1190STATIC_VAR int iiCmatrix_index=0;
1191#endif
1192void * sleftv::Data()
1193{
1194 if ((rtyp!=IDHDL) && iiCheckRing(rtyp))
1195 return NULL;
1196 if (Sy_inset(FLAG_OTHER_RING,flag))
1197 {
1198 flag&=~Sy_bit(FLAG_OTHER_RING);
1199 WerrorS("object from another ring");
1200 return NULL;
1201 }
1202 if (e==NULL)
1203 {
1204 switch (rtyp)
1205 {
1206 case ALIAS_CMD:
1207 {
1208 idhdl h=(idhdl)data;
1209 return ((idhdl)h->data.ustring)->data.ustring;
1210 }
1211 case VECHO: return (void *)(long)si_echo;
1212 case VPRINTLEVEL:return (void *)(long)printlevel;
1213 case VCOLMAX: return (void *)(long)colmax;
1214 case VTIMER: return (void *)(long)getTimer();
1215 case VRTIMER: return (void *)(long)getRTimer();
1216 case VOICE: return (void *)(long)(myynest+1);
1217 case VMAXDEG: return (void *)(long)Kstd1_deg;
1218 case VMAXMULT: return (void *)(long)Kstd1_mu;
1219 case TRACE: return (void *)(long)traceit;
1220 case VSHORTOUT: return (void *)(long)(currRing != NULL ? currRing->ShortOut : 0);
1221 case VMINPOLY:
1222 if ( (currRing != NULL) && nCoeff_is_algExt(currRing->cf) && !nCoeff_is_GF(currRing->cf))
1223 {
1224 /* Q(a), Fp(a), but not GF(q) */
1225 const ring A = currRing->cf->extRing;
1226
1227 assume( A != NULL );
1228 assume( A->qideal != NULL );
1229
1230 return (void *)A->qideal->m[0];
1231 }
1232 else
1233 return (void *)nInit(0);
1234
1235 case VNOETHER: return (void *) (currRing->ppNoether);
1236 case IDHDL:
1237 return IDDATA((idhdl)data);
1238 case COMMAND:
1239 //return NULL;
1240 default:
1241 return data;
1242 }
1243 }
1244 /* e != NULL : */
1245 int t=rtyp;
1246 void *d=data;
1247 if (t==IDHDL)
1248 {
1249 t=((idhdl)data)->typ;

Callers 15

jjSYSTEMFunction · 0.45
jjEXTENDED_SYSTEMFunction · 0.45
newstruct_StringFunction · 0.45
newstruct_Assign_sameFunction · 0.45
newstruct_Op2Function · 0.45
newstruct_OpMFunction · 0.45
jjCRING_ZpFunction · 0.45
jjCRING_ZmFunction · 0.45
jjEQUAL_CRFunction · 0.45
jjR2_CRFunction · 0.45
jjNUMBER2_POWFunction · 0.45
jjNUMBER2_OP2Function · 0.45

Calls 15

NameMethod · 0.95
iiCheckRingFunction · 0.85
WerrorSFunction · 0.85
getTimerFunction · 0.85
getRTimerFunction · 0.85
nCoeff_is_algExtFunction · 0.85
nCoeff_is_GFFunction · 0.85
WerrorFunction · 0.85
omAllocBinFunction · 0.85
getBlackboxStuffFunction · 0.85
rowsMethod · 0.80
colsMethod · 0.80

Tested by 1

mainFunction · 0.36