libTriton version 1.0 build 1592
Loading...
Searching...
No Matches
initVASNamespace.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 initVASNamespace(PyObject* vasDict) {
64 PyDict_Clear(vasDict);
65
66 PyObject* armVASDict = xPyDict_New();
67
77
78 PyObject* armVASDictClass = xPyClass_New(nullptr, armVASDict, xPyString_FromString("ARM"));
79 xPyDict_SetItemString(vasDict, "ARM", armVASDictClass);
80 }
81
82 }; /* python namespace */
83 }; /* bindings namespace */
84}; /* triton namespace */
@ ID_VAS_4S
4 lanes, each containing a 32-bit element.
@ ID_VAS_2D
2 lanes, each containing a 64-bit element.
@ ID_VAS_1D
1 lane containing a 64-bit element.
@ ID_VAS_16B
16 lanes, each containing an 8-bit element.
@ ID_VAS_8B
8 lanes, each containing an 8-bit element.
@ ID_VAS_INVALID
invalid
@ ID_VAS_8H
8 lanes, each containing a 16-bit element.
@ ID_VAS_4H
4 lanes, each containing a 16-bit element.
@ ID_VAS_2S
2 lanes, each containing a 32-bit element.
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
void initVASNamespace(PyObject *vasDict)
Initializes the VAS python namespace.
int xPyDict_SetItemString(PyObject *p, const char *key, PyObject *val)
Same as PyDict_SetItemString but decrements reference on object.
The Triton namespace.