libTriton version 1.0 build 1592
Loading...
Searching...
No Matches
initShiftsNamespace.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
11#include <triton/archEnums.hpp>
12
13
14
65namespace triton {
66 namespace bindings {
67 namespace python {
68
69 void initShiftsNamespace(PyObject* shiftsDict) {
70 PyDict_Clear(shiftsDict);
71
72 PyObject* armShiftsDict = xPyDict_New();
73
85
86 PyObject* armShiftsDictClass = xPyClass_New(nullptr, armShiftsDict, xPyString_FromString("ARM"));
87 xPyDict_SetItemString(shiftsDict, "ARM", armShiftsDictClass);
88 }
89
90 }; /* python namespace */
91 }; /* bindings namespace */
92}; /* triton namespace */
@ ID_SHIFT_LSR
Logical Shift Right (immediate)
@ ID_SHIFT_LSR_REG
Logical Shift Right (register)
@ ID_SHIFT_ASR
Arithmetic Shift Right (immediate)
@ ID_SHIFT_ROR_REG
Rotate Right (register)
@ ID_SHIFT_ROR
Rotate Right (immediate)
@ ID_SHIFT_ASR_REG
Arithmetic Shift Right (register)
@ ID_SHIFT_RRX
Rotate Right with Extend (immediate)
@ ID_SHIFT_RRX_REG
Rotate Right with Extend (register)
@ ID_SHIFT_LSL_REG
Logical Shift Left (register)
@ ID_SHIFT_INVALID
invalid
@ ID_SHIFT_LSL
Logical Shift Left (immediate)
PyObject * xPyClass_New(PyObject *b, PyObject *d, PyObject *n)
Creates a PyClass and raises an exception if it fails. dict is copied in Py3 ! All references are dec...
PyObject * xPyString_FromString(const char *v)
Creates a PyString and raises an exception if it fails.
void initShiftsNamespace(PyObject *shiftsDict)
Initializes the SHIFT python namespace.
PyObject * xPyDict_New(void)
Creates a PyDict and raises an exception if it fails.
PyObject * PyLong_FromUint32(triton::uint32 value)
Returns a pyObject from a triton::uint32.
Definition utils.cpp:322
int xPyDict_SetItemString(PyObject *p, const char *key, PyObject *val)
Same as PyDict_SetItemString but decrements reference on object.
The Triton namespace.