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

Method import_as

Singular/dyn_modules/pyobject/pyobject.cc:194–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192 }
193
194 void import_as(const char* name) const {
195 idhdl handle = enterid(name, 0, DEF_CMD,
196 &IDROOT, FALSE);
197
198 if (handle)
199 {
200 IDDATA(handle) = (char*)m_ptr;
201 Py_XINCREF(m_ptr);
202 IDTYP(handle) = PythonInterpreter::id();
203 }
204 else { WerrorS("Importing pyobject to Singular failed"); }
205 }
206
207 int compare(int op, const self& arg) const
208 { return PyObject_RichCompareBool(*this, arg, py_opid(op)); }

Callers 1

sync_contextsFunction · 0.80

Calls 2

enteridFunction · 0.85
WerrorSFunction · 0.85

Tested by

no test coverage detected