/*
* Copyright (C) 2020 Weber Yann
*
* This file is part of pyrpn.
*
* pyrpn is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* pyrpn is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with pyrpn. If not, see .
*/
#ifndef _PYTHON_IF_H__
#define _PYTHON_IF_H__
#include "config.h"
#include
#define PY_SSIZE_T_CLEAN
#include
#include "structmember.h"
#include "rpn_if.h"
#incdlue "pyton_rpnexpr.h"
/**@defgroup python_if RPN Iterated Function Python class
* @ingroup python_module
* @brief Exposed Python class : RPNIterExpr
*
* Iterated expression are composed of RPN expressions, they are able to
* iterate taking their parameters from a memory array and setting back values
* in it on each iteration.
*
* @see ifs_if
*/
/**@file python_if.h
* @brief Python RPNIterExpr type headers
* @ingroup python_if
*
* This file is the header of the RPNIterExpr Python class
*/
/**@brief RPNIterExpr Python class methods list
* @ingroup python_if */
extern PyMethodDef RPNIterExpr_methods[];
/**@brief RPNIterExpr Python class members list
* @ingroup python_if */
extern PyMemberDef RPNIterExpr_members[];
/**@brief RPNIterExpr Python class type definition
* @ingroup python_if */
extern PyTypeObject RPNIterExprType;
/**@brief Structure holding RPNIterExpr objects
* @ingroup python_if */
typedef struct
{
PyObject_VAR_HEAD;
/**@brief Pointer on @ref rpn_if_s */
rpn_if_t *rif;
} PyRPNIterExpr_t;
/**@brief RpnIterExpr constructor
* @param self New RPNExpr instance
* @param args Positional arguments list
* @param kwds Keywords arguments dict
* @return 0 if no error else -1
* @ingroup python_if
*/
int rpnexpr_init(PyObject *self, PyObject *args, PyObject *kwds);
#endif