91 std::cout << std::flush;
93 Py_TYPE(self)->tp_free((PyObject*)self);
97 static PyObject* SolverModel_getId(PyObject* self, PyObject* noarg) {
102 return PyErr_Format(PyExc_TypeError,
"%s", e.
what());
107 static PyObject* SolverModel_getValue(PyObject* self, PyObject* noarg) {
112 return PyErr_Format(PyExc_TypeError,
"%s", e.
what());
117 static PyObject* SolverModel_getVariable(PyObject* self, PyObject* noarg) {
122 return PyErr_Format(PyExc_TypeError,
"%s", e.
what());
127 #if !defined(IS_PY3_8) || !IS_PY3_8
128 static int SolverModel_print(PyObject* self,
void* io,
int s) {
135 static PyObject* SolverModel_str(PyObject* self) {
140 return PyErr_Format(PyExc_TypeError,
"%s", e.
what());
147 {
"getId", SolverModel_getId, METH_NOARGS,
""},
148 {
"getValue", SolverModel_getValue, METH_NOARGS,
""},
149 {
"getVariable", SolverModel_getVariable, METH_NOARGS,
""},
150 {
nullptr,
nullptr, 0,
nullptr}
155 PyVarObject_HEAD_INIT(&PyType_Type, 0)
163 (printfunc)SolverModel_print,
168 (reprfunc)SolverModel_str,
174 (reprfunc)SolverModel_str,
179 "SolverModel objects",
228 return (PyObject*)object;
This class is used to represent a constraint model solved.
The root class of all exceptions.
TRITON_EXPORT const char * what() const
Returns the exception message.
PyObject * PySymbolicVariable(const triton::engines::symbolic::SharedSymbolicVariable &symVar)
Creates the SymbolicVariable python class.
PyObject * PySolverModel(const triton::engines::solver::SolverModel &model)
Creates the SolverModel python class.
PyObject * PyLong_FromUsize(triton::usize value)
Returns a pyObject from a triton::usize.
PyObject * PyLong_FromUint512(triton::uint512 value)
Returns a pyObject from a triton::uint512.
PyTypeObject SolverModel_Type
pySolverModel type.
std::string toString(const T &obj)
Converts an object to a string.
PyMethodDef SolverModel_callbacks[]
SolverModel methods.
void SolverModel_dealloc(PyObject *self)
SolverModel destructor.
#define PySolverModel_AsSolverModel(v)