-
Notifications
You must be signed in to change notification settings - Fork 0
/
lazylist.h
59 lines (43 loc) · 1.57 KB
/
lazylist.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef OOCMAP_LAZYLIST_H
#define OOCMAP_LAZYLIST_H
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "oocmap.h"
#include "lmdb.h"
//
// OOCLazyList
//
typedef struct {
PyObject_HEAD
OOCMapObject* ooc;
uint32_t listId;
} OOCLazyListObject;
extern PyTypeObject OOCLazyListType;
OOCLazyListObject* OOCLazyList_fastnew(OOCMapObject* ooc, uint32_t listId);
Py_ssize_t OOCLazyListObject_length(OOCLazyListObject* self, OOCTransaction& txn);
PyObject* OOCLazyListObject_eager(OOCLazyListObject* self, OOCTransaction& txn);
PyObject* OOCLazyList_eager(PyObject* pySelf);
Py_ssize_t OOCLazyListObject_index(
OOCLazyListObject* self,
OOCTransaction& txn,
PyObject* value,
Py_ssize_t start = 0,
Py_ssize_t stop = 9223372036854775807
);
Py_ssize_t OOCLazyListObject_count(OOCLazyListObject* self, OOCTransaction& txn, PyObject* value);
void OOCLazyListObject_extend(OOCLazyListObject* self, OOCTransaction& txn, PyObject* pyOther);
void OOCLazyListObject_extend(OOCLazyListObject* self, OOCTransaction& txn, OOCLazyListObject* other);
void OOCLazyListObject_append(OOCLazyListObject* self, OOCTransaction& txn, PyObject* item);
void OOCLazyListObject_clear(OOCLazyListObject* self, OOCTransaction& txn);
void OOCLazyListObject_inplaceRepeat(OOCLazyListObject* self, OOCTransaction& txn, unsigned int count);
//
// OOCLazyListIter
//
typedef struct {
PyObject_HEAD
OOCLazyListObject* list;
MDB_cursor* cursor;
} OOCLazyListIterObject;
extern PyTypeObject OOCLazyListIterType;
OOCLazyListIterObject* OOCLazyListIter_fastnew(OOCLazyListObject* list);
#endif