libTriton
version 1.0 build 1592
Loading...
Searching...
No Matches
src
libtriton
bindings
python
namespaces
initSolverNamespace.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
35
namespace
triton
{
36
namespace
bindings {
37
namespace
python {
38
39
void
initSolverNamespace
(PyObject* solverDict) {
40
PyDict_Clear(solverDict);
41
42
#if defined(TRITON_Z3_INTERFACE)
43
xPyDict_SetItemString
(solverDict,
"Z3"
,
PyLong_FromUint32
(
triton::engines::solver::SOLVER_Z3
));
44
#endif
45
#if defined(TRITON_BITWUZLA_INTERFACE)
46
xPyDict_SetItemString
(solverDict,
"BITWUZLA"
,
PyLong_FromUint32
(
triton::engines::solver::SOLVER_BITWUZLA
));
47
#endif
48
}
49
50
};
/* python namespace */
51
};
/* bindings namespace */
52
};
/* triton namespace */
triton::bindings::python::initSolverNamespace
void initSolverNamespace(PyObject *solverDict)
Initializes the SOLVER python namespace.
Definition
initSolverNamespace.cpp:39
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::SOLVER_Z3
@ SOLVER_Z3
Definition
solverEnums.hpp:43
triton::engines::solver::SOLVER_BITWUZLA
@ SOLVER_BITWUZLA
Definition
solverEnums.hpp:46
triton
The Triton namespace.
Definition
architecture.cpp:27
pythonBindings.hpp
pythonUtils.hpp
pythonXFunctions.hpp
solverEnums.hpp
Generated by
1.10.0