libTriton version 1.0 build 1592
Loading...
Searching...
No Matches
initExtendNamespace.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
59namespace triton {
60 namespace bindings {
61 namespace python {
62
63 void initExtendNamespace(PyObject* extendDict) {
64 PyDict_Clear(extendDict);
65
66 PyObject* armExtendDict = xPyDict_New();
67
77
78 PyObject* armExtendDictClass = xPyClass_New(nullptr, armExtendDict, xPyString_FromString("ARM"));
79 xPyDict_SetItemString(extendDict, "ARM", armExtendDictClass);
80 }
81
82 }; /* python namespace */
83 }; /* bindings namespace */
84}; /* triton namespace */
@ ID_EXTEND_SXTW
Extracts a word (32-bit) value from a register and zero extends it to the size of the register.
@ ID_EXTEND_UXTX
Use the whole 64-bit register.
@ ID_EXTEND_SXTX
Use the whole 64-bit register.
@ ID_EXTEND_SXTH
Extracts a halfword (16-bit) value from a register and zero extends it to the size of the register.
@ ID_EXTEND_UXTB
Extracts a byte (8-bit) value from a register and zero extends it to the size of the register.
@ ID_EXTEND_INVALID
invalid
@ ID_EXTEND_UXTW
Extracts a word (32-bit) value from a register and zero extends it to the size of the register.
@ ID_EXTEND_SXTB
Extracts a byte (8-bit) value from a register and zero extends it to the size of the register.
@ ID_EXTEND_UXTH
Extracts a halfword (16-bit) value from a register and zero extends it to the size of the register.
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.
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.
void initExtendNamespace(PyObject *extendDict)
Initializes the EXTEND python namespace.
The Triton namespace.