libTriton
version 1.0 build 1592
Loading...
Searching...
No Matches
src
libtriton
bindings
python
namespaces
initAstRepresentationNamespace.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/astRepresentation.hpp
>
12
13
14
101
namespace
triton
{
102
namespace
bindings {
103
namespace
python {
104
105
void
initAstRepresentationNamespace
(PyObject* astRepresentationDict) {
106
xPyDict_SetItemString
(astRepresentationDict,
"SMT"
,
PyLong_FromUint32
(
triton::ast::representations::SMT_REPRESENTATION
));
107
xPyDict_SetItemString
(astRepresentationDict,
"PCODE"
,
PyLong_FromUint32
(
triton::ast::representations::PCODE_REPRESENTATION
));
108
xPyDict_SetItemString
(astRepresentationDict,
"PYTHON"
,
PyLong_FromUint32
(
triton::ast::representations::PYTHON_REPRESENTATION
));
109
}
110
111
};
/* python namespace */
112
};
/* bindings namespace */
113
};
/* triton namespace */
astRepresentation.hpp
triton::bindings::python::initAstRepresentationNamespace
void initAstRepresentationNamespace(PyObject *astRepresentationDict)
Initializes the AST_REPRESENTATION python namespace.
Definition
initAstRepresentationNamespace.cpp:105
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::ast::representations::PCODE_REPRESENTATION
@ PCODE_REPRESENTATION
Definition
astEnums.hpp:101
triton::ast::representations::SMT_REPRESENTATION
@ SMT_REPRESENTATION
Definition
astEnums.hpp:99
triton::ast::representations::PYTHON_REPRESENTATION
@ PYTHON_REPRESENTATION
Definition
astEnums.hpp:100
triton
The Triton namespace.
Definition
architecture.cpp:27
pythonBindings.hpp
pythonUtils.hpp
pythonXFunctions.hpp
Generated by
1.10.0