libTriton
version 1.0 build 1592
Loading...
Searching...
No Matches
src
libtriton
bindings
python
namespaces
initArchNamespace.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/architecture.hpp
>
12
13
14
39
namespace
triton
{
40
namespace
bindings {
41
namespace
python {
42
43
void
initArchNamespace
(PyObject* archDict) {
44
xPyDict_SetItemString
(archDict,
"AARCH64"
,
PyLong_FromUint32
(
triton::arch::ARCH_AARCH64
));
45
xPyDict_SetItemString
(archDict,
"ARM32"
,
PyLong_FromUint32
(
triton::arch::ARCH_ARM32
));
46
#ifdef COMPILE_RISCV
47
xPyDict_SetItemString
(archDict,
"RV32"
,
PyLong_FromUint32
(triton::arch::ARCH_RV32));
48
xPyDict_SetItemString
(archDict,
"RV64"
,
PyLong_FromUint32
(triton::arch::ARCH_RV64));
49
#endif
50
xPyDict_SetItemString
(archDict,
"X86"
,
PyLong_FromUint32
(
triton::arch::ARCH_X86
));
51
xPyDict_SetItemString
(archDict,
"X86_64"
,
PyLong_FromUint32
(
triton::arch::ARCH_X86_64
));
52
}
53
54
};
/* python namespace */
55
};
/* bindings namespace */
56
};
/* triton namespace */
architecture.hpp
triton::arch::ARCH_X86
@ ARCH_X86
Definition
archEnums.hpp:40
triton::arch::ARCH_AARCH64
@ ARCH_AARCH64
Definition
archEnums.hpp:34
triton::arch::ARCH_ARM32
@ ARCH_ARM32
Definition
archEnums.hpp:35
triton::arch::ARCH_X86_64
@ ARCH_X86_64
Definition
archEnums.hpp:41
triton::bindings::python::initArchNamespace
void initArchNamespace(PyObject *archDict)
Initializes the ARCH python namespace.
Definition
initArchNamespace.cpp:43
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
The Triton namespace.
Definition
architecture.cpp:27
pythonBindings.hpp
pythonUtils.hpp
pythonXFunctions.hpp
Generated by
1.10.0