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

Function ring_set

Singular/dyn_modules/python/ring_wrap.cc:15–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13 return boost::python::str(out,strlen(out));
14}
15void ring_set(Ring & R)
16{
17 ring r=R.pimpl.get();
18 idhdl h=rFindHdl(r,NULL);
19 if (h==NULL)
20 {
21 char name_buffer[100];
22 STATIC_VAR int ending=0;
23 ending++;
24 sprintf(name_buffer, "PYTHON_RING_VAR%d",ending);
25 h=enterid(name_buffer,0,RING_CMD,&IDROOT);
26 IDRING(h)=r;
27 r->ref++;
28 }
29 rSetHdl(h);
30 for(int i=myynest;i>=0;i--) iiLocalRing[i]=r;
31}
32void export_ring()
33{
34boost::python::class_<Ring>("Ring", "reference to a Singular ring")

Callers

nothing calls this directly

Calls 4

rFindHdlFunction · 0.85
enteridFunction · 0.85
rSetHdlFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected