| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 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 : /usr/lib/python3/dist-packages/pythran/pythonic/include/types/ |
Upload File : |
#ifndef PYTHONIC_INCLUDE_TYPES_CFUN_HPP
#define PYTHONIC_INCLUDE_TYPES_CFUN_HPP
PYTHONIC_NS_BEGIN
namespace types
{
template <class T>
struct cfun;
template <class ReturnType, class... ArgsType>
struct cfun<ReturnType(ArgsType...)> {
using callable = void;
cfun(ReturnType (*fun)(ArgsType...));
ReturnType (*ptr)(ArgsType...);
ReturnType operator()(ArgsType... args) const;
};
}
PYTHONIC_NS_END
#ifdef ENABLE_PYTHON_MODULE
#include "pythonic/python/core.hpp"
PYTHONIC_NS_BEGIN
template <class R, class... Args>
struct to_python<types::cfun<R(Args...)>> {
static PyObject *convert(types::cfun<R(Args...)> const &v);
};
template <class R, class... Args>
struct from_python<types::cfun<R(Args...)>> {
static bool is_convertible(PyObject *obj);
static types::cfun<R(Args...)> convert(PyObject *obj);
};
PYTHONIC_NS_END
#endif
#endif