libTriton
version 1.0 build 1592
Loading...
Searching...
No Matches
src
libtriton
bindings
python
namespaces
initSolverStateNamespace.cpp
Go to the documentation of this file.
1
2
/*
3
** Copyright (C) - Triton
4
**
5
** This program is under the terms of the Apache License 2.0.
6
*/
7
8
#include <
triton/pythonBindings.hpp
>
9
#include <
triton/pythonUtils.hpp
>
10
#include <
triton/pythonXFunctions.hpp
>
11
#include <
triton/solverEnums.hpp
>
12
13
14
38
namespace
triton
{
39
namespace
bindings {
40
namespace
python {
41
42
void
initSolverStateNamespace
(PyObject* solverStateDict) {
43
PyDict_Clear(solverStateDict);
44
45
xPyDict_SetItemString
(solverStateDict,
"OUTOFMEM"
,
PyLong_FromUint32
(
triton::engines::solver::OUTOFMEM
));
46
xPyDict_SetItemString
(solverStateDict,
"SAT"
,
PyLong_FromUint32
(
triton::engines::solver::SAT
));
47
xPyDict_SetItemString
(solverStateDict,
"TIMEOUT"
,
PyLong_FromUint32
(
triton::engines::solver::TIMEOUT
));
48
xPyDict_SetItemString
(solverStateDict,
"UNKNOWN"
,
PyLong_FromUint32
(
triton::engines::solver::UNKNOWN
));
49
xPyDict_SetItemString
(solverStateDict,
"UNSAT"
,
PyLong_FromUint32
(
triton::engines::solver::UNSAT
));
50
}
51
52
};
/* python namespace */
53
};
/* bindings namespace */
54
};
/* triton namespace */
triton::bindings::python::initSolverStateNamespace
void initSolverStateNamespace(PyObject *solverStateDict)
Initializes the SOLVER_STATE python namespace.
Definition
initSolverStateNamespace.cpp:42
triton::bindings::python::PyLong_FromUint32
PyObject * PyLong_FromUint32(triton::uint32 value)
Returns a pyObject from a triton::uint32.
Definition
utils.cpp:322
triton::bindings::python::xPyDict_SetItemString
int xPyDict_SetItemString(PyObject *p, const char *key, PyObject *val)
Same as PyDict_SetItemString but decrements reference on object.
Definition
pyXFunctions.cpp:72
triton::engines::solver::TIMEOUT
@ TIMEOUT
Definition
solverEnums.hpp:54
triton::engines::solver::SAT
@ SAT
Definition
solverEnums.hpp:53
triton::engines::solver::OUTOFMEM
@ OUTOFMEM
Definition
solverEnums.hpp:55
triton::engines::solver::UNSAT
@ UNSAT
Definition
solverEnums.hpp:52
triton::engines::solver::UNKNOWN
@ UNKNOWN
Definition
solverEnums.hpp:56
triton
The Triton namespace.
Definition
architecture.cpp:27
pythonBindings.hpp
pythonUtils.hpp
pythonXFunctions.hpp
solverEnums.hpp
Generated by
1.10.0