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

Function iiCallLibProc1

Singular/iplib.cc:635–666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

633}
634
635void* iiCallLibProc1(const char*n, void *arg, int arg_type, BOOLEAN &err)
636{
637 idhdl h=ggetid(n);
638 if ((h==NULL)
639 || (IDTYP(h)!=PROC_CMD))
640 {
641 err=2;
642 return NULL;
643 }
644 // ring handling
645 idhdl save_ringhdl=currRingHdl;
646 ring save_ring=currRing;
647 iiCallLibProcBegin();
648 // argument:
649 sleftv tmp;
650 tmp.Init();
651 tmp.data=arg;
652 tmp.rtyp=arg_type;
653 // call proc
654 err=iiMake_proc(h,currPack,&tmp);
655 // clean up ring
656 iiCallLibProcEnd(save_ringhdl,save_ring);
657 // return
658 if (err==FALSE)
659 {
660 void*r=iiRETURNEXPR.data;
661 iiRETURNEXPR.data=NULL;
662 iiRETURNEXPR.CleanUp();
663 return r;
664 }
665 return NULL;
666}
667
668// return NULL on failure
669ideal ii_CallProcId2Id(const char *lib,const char *proc, ideal arg, const ring R)

Callers 3

ii_CallProcId2IdFunction · 0.85
ii_CallProcId2IntFunction · 0.85
idGroebnerFunction · 0.85

Calls 6

ggetidFunction · 0.85
iiCallLibProcBeginFunction · 0.85
iiMake_procFunction · 0.85
iiCallLibProcEndFunction · 0.85
CleanUpMethod · 0.80
InitMethod · 0.45

Tested by

no test coverage detected