-
Notifications
You must be signed in to change notification settings - Fork 0
/
lazytuple.h
36 lines (26 loc) · 895 Bytes
/
lazytuple.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
#ifndef OOCMAP_LAZYTUPLE_H
#define OOCMAP_LAZYTUPLE_H
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "oocmap.h"
#include "lmdb.h"
typedef struct {
PyObject_HEAD
OOCMapObject* ooc;
uint64_t tupleId;
PyObject* eager;
} OOCLazyTupleObject;
extern PyTypeObject OOCLazyTupleType;
OOCLazyTupleObject* OOCLazyTuple_fastnew(OOCMapObject* ooc, uint64_t tupleId);
Py_ssize_t OOCLazyTupleObject_length(OOCLazyTupleObject* self, OOCTransaction& txn);
PyObject* OOCLazyTupleObject_eager(OOCLazyTupleObject* self, OOCTransaction& txn);
PyObject* OOCLazyTuple_eager(PyObject* pySelf);
Py_ssize_t OOCLazyTupleObject_index(
OOCLazyTupleObject* self,
OOCTransaction& txn,
PyObject* value,
Py_ssize_t start = 0,
Py_ssize_t stop = 9223372036854775807
);
Py_ssize_t OOCLazyTupleObject_count(OOCLazyTupleObject* self, OOCTransaction& txn, PyObject* value);
#endif