76 std::cout << std::flush;
78 Py_TYPE(self)->tp_free((PyObject*)self);
82 static PyObject* BitsVector_getHigh(PyObject* self, PyObject* noarg) {
87 return PyErr_Format(PyExc_TypeError,
"%s", e.
what());
92 static PyObject* BitsVector_getLow(PyObject* self, PyObject* noarg) {
97 return PyErr_Format(PyExc_TypeError,
"%s", e.
what());
102 static PyObject* BitsVector_getMaxValue(PyObject* self, PyObject* noarg) {
107 return PyErr_Format(PyExc_TypeError,
"%s", e.
what());
112 static PyObject* BitsVector_getVectorSize(PyObject* self, PyObject* noarg) {
117 return PyErr_Format(PyExc_TypeError,
"%s", e.
what());
122 #if !defined(IS_PY3_8) || !IS_PY3_8
123 static int BitsVector_print(PyObject* self,
void* io,
int s) {
130 static PyObject* BitsVector_str(PyObject* self) {
135 return PyErr_Format(PyExc_TypeError,
"%s", e.
what());
142 {
"getHigh", BitsVector_getHigh, METH_NOARGS,
""},
143 {
"getLow", BitsVector_getLow, METH_NOARGS,
""},
144 {
"getMaxValue", BitsVector_getMaxValue, METH_NOARGS,
""},
145 {
"getVectorSize", BitsVector_getVectorSize, METH_NOARGS,
""},
146 {
nullptr,
nullptr, 0,
nullptr}
151 PyVarObject_HEAD_INIT(&PyType_Type, 0)
159 (printfunc)BitsVector_print,
164 (reprfunc)BitsVector_str,
170 (reprfunc)BitsVector_str,
175 "BitsVector objects",
219 template <
typename T>
220 PyObject* PyBitsVector(
const T& op) {
228 return (PyObject*)object;
This class is used to deal with registers and memory as bits vector.
This class is used to represent a memory access.
This class is used when an instruction has a register operand.
The root class of all exceptions.
TRITON_EXPORT const char * what() const
Returns the exception message.
PyObject * PyLong_FromUint512(triton::uint512 value)
Returns a pyObject from a triton::uint512.
PyTypeObject BitsVector_Type
pyBitsVector type.
PyObject * PyLong_FromUint32(triton::uint32 value)
Returns a pyObject from a triton::uint32.
std::string toString(const T &obj)
Converts an object to a string.
PyMethodDef BitsVector_callbacks[]
BitsVector methods.
void BitsVector_dealloc(PyObject *self)
BitsVector destructor.
#define PyBitsVector_AsBitsVector(v)