| Server IP : 217.160.0.135 / Your IP : 216.73.217.117 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3/dist-packages/pythran/pythonic/types/ |
Upload File : |
#ifndef PYTHONIC_TYPES_POINTER_HPP
#define PYTHONIC_TYPES_POINTER_HPP
#include "pythonic/include/types/pointer.hpp"
PYTHONIC_NS_BEGIN
namespace types
{
template <class T>
typename pointer<T>::reference pointer<T>::operator[](long i)
{
return data[i];
}
template <class T>
typename pointer<T>::value_type pointer<T>::operator[](long i) const
{
return data[i];
}
template <class T>
typename pointer<T>::reference pointer<T>::fast(long i)
{
return data[i];
}
template <class T>
typename pointer<T>::value_type pointer<T>::fast(long i) const
{
return data[i];
}
}
PYTHONIC_NS_END
namespace std
{
template <size_t I, class T>
typename pythonic::types::pointer<T>::reference
get(pythonic::types::pointer<T> &t)
{
return t[I];
}
template <size_t I, class T>
typename pythonic::types::pointer<T>::value_type
get(pythonic::types::pointer<T> const &t)
{
return t[I];
}
template <size_t I, class T>
typename pythonic::types::pointer<T>::value_type
get(pythonic::types::pointer<T> &&t)
{
return t[I];
}
}
#ifdef ENABLE_PYTHON_MODULE
PYTHONIC_NS_BEGIN
template <typename T>
PyObject *to_python<types::pointer<T>>::convert(types::pointer<T> const &v)
{
return nullptr;
}
template <class T>
bool from_python<types::pointer<T>>::is_convertible(PyObject *obj)
{
return false;
}
template <class T>
types::pointer<T> from_python<types::pointer<T>>::convert(PyObject *obj)
{
return {nullptr};
}
PYTHONIC_NS_END
#endif
#endif