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

Function newstruct_Op1

Singular/newstruct.cc:259–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257}
258
259BOOLEAN newstruct_Op1(int op, leftv res, leftv arg)
260{
261 // interpreter: arg is newstruct
262 blackbox *a=getBlackboxStuff(arg->Typ());
263 newstruct_desc nt=(newstruct_desc)a->data;
264 newstruct_proc p=nt->procs;
265
266 while((p!=NULL) &&( (p->t!=op) || (p->args!=1) )) p=p->next;
267
268 if (p!=NULL)
269 {
270 idrec hh;
271 hh.Init();
272 hh.id=Tok2Cmdname(p->t);
273 hh.typ=PROC_CMD;
274 hh.data.pinf=p->p;
275 BOOLEAN sl=iiMake_proc(&hh,NULL,arg);
276 if (sl) return TRUE;
277 else
278 {
279 memcpy(res,&iiRETURNEXPR,sizeof(sleftv));
280 iiRETURNEXPR.Init();
281 return FALSE;
282 }
283 }
284 return blackboxDefaultOp1(op,res,arg);
285}
286
287BOOLEAN newstruct_Assign(leftv l, leftv r)
288{

Callers 2

newstruct_AssignFunction · 0.85
pyobject_Op1Function · 0.85

Calls 6

getBlackboxStuffFunction · 0.85
iiMake_procFunction · 0.85
blackboxDefaultOp1Function · 0.85
Tok2CmdnameFunction · 0.70
TypMethod · 0.45
InitMethod · 0.45

Tested by

no test coverage detected