39 lines
639 B
C
39 lines
639 B
C
|
#ifndef interpol_internal_deque_h
|
||
|
#define interpol_internal_deque_h
|
||
|
#include <Python.h>
|
||
|
|
||
|
/*
|
||
|
*
|
||
|
* This module contains a linked list implementation that is used internally
|
||
|
* as a deque. The internal deques are then converted to python lists.
|
||
|
*
|
||
|
* */
|
||
|
|
||
|
typedef struct i_deque_s
|
||
|
{
|
||
|
struct i_deque_s * next;
|
||
|
PyObject * content;
|
||
|
size_t following;
|
||
|
} i_deque_t;
|
||
|
|
||
|
|
||
|
i_deque_t *
|
||
|
i_deque_t_new
|
||
|
( PyObject * content
|
||
|
, i_deque_t * next);
|
||
|
|
||
|
void
|
||
|
i_deque_t_del
|
||
|
(i_deque_t * deque);
|
||
|
|
||
|
PyObject *
|
||
|
i_deque_t_to_List
|
||
|
(i_deque_t * deque);
|
||
|
|
||
|
|
||
|
#define i_deque_t_start() NULL
|
||
|
#define i_deque_t_insert(deque, content) i_deque_t_new(content, deque)
|
||
|
|
||
|
|
||
|
#endif
|