summaryrefslogtreecommitdiff
path: root/src/blob.h
blob: faaef647a3e86e6a50b515c142ac95a2b6f040c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef PYSQLITE_BLOB_H
#define PYSQLITE_BLOB_H
#include "Python.h"
#include "sqlite3.h"
#include "connection.h"

typedef struct
{
    PyObject_HEAD
    pysqlite_Connection* connection;
    sqlite3_blob *blob;
    unsigned int offset;

    PyObject* in_weakreflist; /* List of weak references */
} pysqlite_Blob;

extern PyTypeObject pysqlite_BlobType;

int pysqlite_blob_init(pysqlite_Blob* self, pysqlite_Connection* connection, sqlite3_blob *blob);
PyObject* pysqlite_blob_close(pysqlite_Blob *self);

int pysqlite_blob_setup_types(void);

#endif