libTriton version 1.0 build 1590
Loading...
Searching...
No Matches
initConditionsNamespace.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
12
13
14
80namespace triton {
81 namespace bindings {
82 namespace python {
83
84 void initConditionsNamespace(PyObject* conditionsDict) {
85 PyDict_Clear(conditionsDict);
86
87 PyObject* armConditionsDict = xPyDict_New();
88
105
106 PyObject* armConditionsDictClass = xPyClass_New(nullptr, armConditionsDict, xPyString_FromString("ARM"));
107 xPyDict_SetItemString(conditionsDict, "ARM", armConditionsDictClass);
108 }
109
110 }; /* python namespace */
111 }; /* bindings namespace */
112}; /* triton namespace */
@ ID_CONDITION_HS
Higher or same (unsigned >=). C set.
@ ID_CONDITION_PL
Positive or zero. N clear.
@ ID_CONDITION_VC
No overflow. V clear.
@ ID_CONDITION_LE
Signed <=. Z set, N and V differ.
@ ID_CONDITION_VS
Overflow. V set.
@ ID_CONDITION_MI
Negative. N set.
@ ID_CONDITION_GE
Signed >=. N and V the same.
@ ID_CONDITION_GT
Signed >. Z clear, N and V the same.
@ ID_CONDITION_HI
Higher (unsigned >). C set and Z clear.
@ ID_CONDITION_NE
Not equal. Z clear.
@ ID_CONDITION_AL
Always. Any flags. This suffix is normally omitted.
@ ID_CONDITION_LO
Lower (unsigned <). C clear.
@ ID_CONDITION_LT
Signed <. N and V differ.
@ ID_CONDITION_LS
Lower or same (unsigned <=). C clear or Z set.
@ ID_CONDITION_INVALID
invalid
@ ID_CONDITION_EQ
Equal. Z set.
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...
void initConditionsNamespace(PyObject *conditionsDict)
Initializes the CONDITION python namespace.
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:305
int xPyDict_SetItemString(PyObject *p, const char *key, PyObject *val)
Same as PyDict_SetItemString but decrements reference on object.
The Triton namespace.