说明:使用Python调用AddList函数,使得传入的列表参数求和并且加上偏移量
#include <Python.h>
PyObject* AddList(PyObject*, PyObject* arg)
{
PyObject* list;
int temp = 0;
//if (!PyArg_ParseTuple(arg, "iO", &temp,&list)) 两种方式都可以传递Python列表
说明:使用Python调用AddList函数,使得传入的列表参数求和并且加上偏移量
#include <Python.h>
PyObject* AddList(PyObject*, PyObject* arg)
{
PyObject* list;
int temp = 0;
//if (!PyArg_ParseTuple(arg, "iO", &temp,&list)) 两种方式都可以传递Python列表