libTriton
version 1.0 build 1592
Loading...
Searching...
No Matches
src
libtriton
bindings
python
namespaces
initExceptionNamespace.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/archEnums.hpp
>
12
13
14
47
namespace
triton
{
48
namespace
bindings {
49
namespace
python {
50
51
void
initExceptionNamespace
(PyObject* exceptionDict) {
52
xPyDict_SetItemString
(exceptionDict,
"NO_FAULT"
,
PyLong_FromUint32
(
triton::arch::NO_FAULT
));
53
xPyDict_SetItemString
(exceptionDict,
"FAULT_DE"
,
PyLong_FromUint32
(
triton::arch::FAULT_DE
));
54
xPyDict_SetItemString
(exceptionDict,
"FAULT_BP"
,
PyLong_FromUint32
(
triton::arch::FAULT_BP
));
55
xPyDict_SetItemString
(exceptionDict,
"FAULT_UD"
,
PyLong_FromUint32
(
triton::arch::FAULT_UD
));
56
xPyDict_SetItemString
(exceptionDict,
"FAULT_GP"
,
PyLong_FromUint32
(
triton::arch::FAULT_GP
));
57
}
58
59
};
/* python namespace */
60
};
/* bindings namespace */
61
};
/* triton namespace */
archEnums.hpp
triton::arch::NO_FAULT
@ NO_FAULT
Definition
archEnums.hpp:60
triton::arch::FAULT_UD
@ FAULT_UD
Definition
archEnums.hpp:63
triton::arch::FAULT_GP
@ FAULT_GP
Definition
archEnums.hpp:64
triton::arch::FAULT_BP
@ FAULT_BP
Definition
archEnums.hpp:62
triton::arch::FAULT_DE
@ FAULT_DE
Definition
archEnums.hpp:61
triton::bindings::python::initExceptionNamespace
void initExceptionNamespace(PyObject *exceptionDict)
Initializes the EXCEPTION python namespace.
Definition
initExceptionNamespace.cpp:51
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