diff options
author | Ruben Pollan <meskio@sindominio.net> | 2017-02-02 20:25:20 +0100 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2017-02-02 23:58:37 +0100 |
commit | bb9cc1216873604459724860d606283c398ea06b (patch) | |
tree | 877eb31a32e52619092e90ab83241986bdd475ef /src/blob.h | |
parent | a55df58db59d38d7d320f51fa760f20cf1f69312 (diff) |
[feat] add support for the blob interfacedevelop
Pysqlcipher support for the sqlite blob interface:
https://sqlite.org/c3ref/blob_open.html
Copying the code from the PR in pysqlite:
https://github.com/ghaering/pysqlite/pull/93
Diffstat (limited to 'src/blob.h')
-rw-r--r-- | src/blob.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/blob.h b/src/blob.h new file mode 100644 index 0000000..faaef64 --- /dev/null +++ b/src/blob.h @@ -0,0 +1,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 |