libTriton
version 1.0 build 1592
Loading...
Searching...
No Matches
src
libtriton
bindings
python
namespaces
initOperandNamespace.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
37
namespace
triton
{
38
namespace
bindings {
39
namespace
python {
40
41
void
initOperandNamespace
(PyObject* operandDict) {
42
xPyDict_SetItemString
(operandDict,
"INVALID"
,
PyLong_FromUint32
(
triton::arch::OP_INVALID
));
43
xPyDict_SetItemString
(operandDict,
"IMM"
,
PyLong_FromUint32
(
triton::arch::OP_IMM
));
44
xPyDict_SetItemString
(operandDict,
"MEM"
,
PyLong_FromUint32
(
triton::arch::OP_MEM
));
45
xPyDict_SetItemString
(operandDict,
"REG"
,
PyLong_FromUint32
(
triton::arch::OP_REG
));
46
}
47
48
};
/* python namespace */
49
};
/* bindings namespace */
50
};
/* triton namespace */
archEnums.hpp
triton::arch::OP_IMM
@ OP_IMM
Definition
archEnums.hpp:53
triton::arch::OP_INVALID
@ OP_INVALID
Definition
archEnums.hpp:52
triton::arch::OP_MEM
@ OP_MEM
Definition
archEnums.hpp:54
triton::arch::OP_REG
@ OP_REG
Definition
archEnums.hpp:55
triton::bindings::python::initOperandNamespace
void initOperandNamespace(PyObject *operandDict)
Initializes the OPERAND python namespace.
Definition
initOperandNamespace.cpp:41
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