libTriton version 1.0 build 1592
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
utils.cpp File Reference
#include <triton/pythonBindings.hpp>
#include <triton/pythonUtils.hpp>
#include <triton/exceptions.hpp>
#include <triton/tritonTypes.hpp>
#include <limits>

Go to the source code of this file.

Namespaces

namespace  triton
 The Triton namespace.
 
namespace  triton::bindings
 The Bindings namespace.
 
namespace  triton::bindings::python
 The Python namespace.
 

Macros

#define tt_GET_OB_DIGIT(obj)   obj->ob_digit
 
#define tt_SET_OB_DIGIT(obj, n)   Py_SIZE(obj) = n
 
#define tt_PyLong_IsNegative(obj)   (Py_SIZE(obj) < 0)
 
#define tt_PyLong_DigitCount(obj)   (tt_PyLong_IsNegative(obj) ? -Py_SIZE(obj) : Py_SIZE(obj))
 

Functions

bool triton::bindings::python::PyLong_AsBool (PyObject *obj)
 Returns a bool from a pyObject.
 
triton::__uint triton::bindings::python::PyLong_AsUint (PyObject *obj)
 Returns a triton::__uint from a pyObject.
 
triton::usize triton::bindings::python::PyLong_AsUsize (PyObject *obj)
 Returns a triton::usize from a pyObject.
 
triton::uint32 triton::bindings::python::PyLong_AsUint32 (PyObject *obj)
 Returns a triton::uint32 from a pyObject.
 
triton::uint64 triton::bindings::python::PyLong_AsUint64 (PyObject *obj)
 Returns a triton::uint64 from a pyObject.
 
triton::uint128 triton::bindings::python::PyLong_AsUint128 (PyObject *obj)
 Returns a triton::uint128 from a pyObject.
 
triton::uint256 triton::bindings::python::PyLong_AsUint256 (PyObject *obj)
 Returns a triton::uint256 from a pyObject.
 
triton::uint512 triton::bindings::python::PyLong_AsUint512 (PyObject *obj)
 Returns a triton::uint512 from a pyObject.
 
PyObject * triton::bindings::python::PyLong_FromUint (triton::__uint value)
 Returns a pyObject from a triton::__uint.
 
PyObject * triton::bindings::python::PyLong_FromUsize (triton::usize value)
 Returns a pyObject from a triton::usize.
 
PyObject * triton::bindings::python::PyLong_FromUint32 (triton::uint32 value)
 Returns a pyObject from a triton::uint32.
 
PyObject * triton::bindings::python::PyLong_FromUint64 (triton::uint64 value)
 Returns a pyObject from a triton::uint64.
 
PyObject * triton::bindings::python::PyLong_FromUint128 (triton::uint128 value)
 Returns a pyObject from a triton::uint128.
 
PyObject * triton::bindings::python::PyLong_FromUint256 (triton::uint256 value)
 Returns a pyObject from a triton::uint256.
 
PyObject * triton::bindings::python::PyLong_FromUint512 (triton::uint512 value)
 Returns a pyObject from a triton::uint512.
 

Macro Definition Documentation

◆ tt_GET_OB_DIGIT

#define tt_GET_OB_DIGIT ( obj)    obj->ob_digit

Definition at line 33 of file utils.cpp.

◆ tt_PyLong_DigitCount

#define tt_PyLong_DigitCount ( obj)    (tt_PyLong_IsNegative(obj) ? -Py_SIZE(obj) : Py_SIZE(obj))

Definition at line 36 of file utils.cpp.

◆ tt_PyLong_IsNegative

#define tt_PyLong_IsNegative ( obj)    (Py_SIZE(obj) < 0)

Definition at line 35 of file utils.cpp.

◆ tt_SET_OB_DIGIT

#define tt_SET_OB_DIGIT ( obj,
n )   Py_SIZE(obj) = n

Definition at line 34 of file utils.cpp.