libTriton  version 0.7 build 1409
pythonBindings.hpp
Go to the documentation of this file.
1 /*
3 ** Copyright (C) - Triton
4 **
5 ** This program is under the terms of the BSD License.
6 */
7 
8 #ifndef TRITONPYTHONBINDINGS_H
9 #define TRITONPYTHONBINDINGS_H
10 
11 #include <Python.h>
12 #include <longintrepr.h>
13 #if _WIN32
14  #include <cmath>
15  #define _hypot hypot
16 #endif
17 
18 #include <triton/py3c_compat.h>
19 
20 
21 
23 namespace triton {
29  namespace bindings {
37  namespace python {
45  extern PyObject* tritonModule;
47 
50 
52  extern PyMethodDef tritonCallbacks[];
53 
55  void initArchNamespace(PyObject* archDict);
56 
58  void initAstNodeNamespace(PyObject* astNodeDict);
59 
61  void initAstRepresentationNamespace(PyObject* astRepresentationDict);
62 
64  void initCallbackNamespace(PyObject* callbackDict);
65 
67  void initConditionsNamespace(PyObject* conditionsDict);
68 
70  void initCpuSizeNamespace(PyObject* cpuSizeDict);
71 
73  void initOpcodesNamespace(PyObject* opcodeDict);
74 
76  void initPrefixesNamespace(PyObject* prefixDict);
77 
79  void initOperandNamespace(PyObject* operandDict);
80 
82  void initShiftsNamespace(PyObject* shiftDict);
83 
85  void initExtendNamespace(PyObject* extendDict);
86 
88  void initRegNamespace(PyObject* regDict);
89 
91  void initModeNamespace(PyObject* modeDict);
92 
94  void initSymbolicNamespace(PyObject* symbolicDict);
95 
96  #if defined(__unix__) || defined(__APPLE__)
97  void initSyscall64Namespace(PyObject* sys64Dict);
99 
100  #if defined(__unix__)
101  void initSyscall32Namespace(PyObject* sys32Dict);
103  #endif
104  #endif
105 
107  void initVersionNamespace(PyObject* versionDict);
108 
110  #if IS_PY3
111  PyMODINIT_FUNC PyInit_triton(void);
112  #else
113  PyMODINIT_FUNC inittriton(void);
114  PyObject* PyInit_triton(void);
115  #endif
116 
118  };
120  };
122 };
123 
124 #endif /* TRITONPYTHONBINDINGS_H */
void initCpuSizeNamespace(PyObject *cpuSizeDict)
Initializes the CPUSIZE python namespace.
void initPrefixesNamespace(PyObject *prefixesDict)
Initializes the PREFIX python namespace.
PyMODINIT_FUNC inittriton(void)
Entry point python bindings (Py2/3).
Definition: init.cpp:42
PyMethodDef tritonCallbacks[]
triton python methods.
void initShiftsNamespace(PyObject *shiftsDict)
Initializes the SHIFT python namespace.
void initArchNamespace(PyObject *archDict)
Initializes the ARCH python namespace.
void initSymbolicNamespace(PyObject *symbolicDict)
Initializes the SYMBOLIC python namespace.
The Triton namespace.
Definition: api.cpp:226
PyModuleDef tritonModuleDef
triton python module definition.
Definition: init.cpp:22
void initAstRepresentationNamespace(PyObject *astRepresentationDict)
Initializes the AST_REPRESENTATION python namespace.
void initConditionsNamespace(PyObject *conditionsDict)
Initializes the CONDITION python namespace.
void initSyscall64Namespace(PyObject *syscallsDict64)
Initializes the SYSCALL32 python namespace.
void initVersionNamespace(PyObject *versionDict)
Initializes the VERSION python namespace.
void initOpcodesNamespace(PyObject *opcodesDict)
Initializes the OPCODE python namespace.
void initOperandNamespace(PyObject *operandDict)
Initializes the OPERAND python namespace.
PyObject * tritonModule
triton python module.
Definition: init.cpp:20
void initAstNodeNamespace(PyObject *astNodeDict)
Initializes the AST_NODE python namespace.
void initCallbackNamespace(PyObject *callbackDict)
Initializes the CALLBACK python namespace.
void initModeNamespace(PyObject *modeDict)
Initializes the MODE python namespace.
void initExtendNamespace(PyObject *extendDict)
Initializes the EXTEND python namespace.
void initSyscall32Namespace(PyObject *syscallsDict32)
Initializes the SYSCALL32 python namespace.
void initRegNamespace(PyObject *registersDict)
Initializes the REG python namespace.