mirror of https://github.com/pyodide/pyodide.git
136 lines
3.4 KiB
Diff
136 lines
3.4 KiB
Diff
|
diff --git a/Modules/_sqlite/Modules/_sqlite/cache.c b/Modules/_sqlite/cache.c
|
||
|
index 72b1f2c..2190bd4 100644
|
||
|
--- a/Modules/_sqlite/cache.c
|
||
|
+++ b/Modules/_sqlite/cache.c
|
||
|
@@ -24,6 +24,10 @@
|
||
|
#include "cache.h"
|
||
|
#include <limits.h>
|
||
|
|
||
|
+#ifndef MODULE_NAME
|
||
|
+#define MODULE_NAME "sqlite"
|
||
|
+#endif
|
||
|
+
|
||
|
/* only used internally */
|
||
|
pysqlite_Node* pysqlite_new_node(PyObject* key, PyObject* data)
|
||
|
{
|
||
|
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
|
||
|
index 6e05761..2d1ad34 100644
|
||
|
--- a/Modules/_sqlite/connection.c
|
||
|
+++ b/Modules/_sqlite/connection.c
|
||
|
@@ -45,6 +45,10 @@
|
||
|
#define HAVE_BACKUP_API
|
||
|
#endif
|
||
|
|
||
|
+#ifndef MODULE_NAME
|
||
|
+#define MODULE_NAME "sqlite"
|
||
|
+#endif
|
||
|
+
|
||
|
_Py_IDENTIFIER(cursor);
|
||
|
|
||
|
static const char * const begin_statements[] = {
|
||
|
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c
|
||
|
index 4ecb5b4..24b03c1 100644
|
||
|
--- a/Modules/_sqlite/cursor.c
|
||
|
+++ b/Modules/_sqlite/cursor.c
|
||
|
@@ -25,6 +25,10 @@
|
||
|
#include "module.h"
|
||
|
#include "util.h"
|
||
|
|
||
|
+#ifndef MODULE_NAME
|
||
|
+#define MODULE_NAME "sqlite"
|
||
|
+#endif
|
||
|
+
|
||
|
PyObject* pysqlite_cursor_iternext(pysqlite_Cursor* self);
|
||
|
|
||
|
static const char errmsg_fetch_across_rollback[] = "Cursor needed to be reset because of commit/rollback and can no longer be fetched from.";
|
||
|
diff --git a/Modules/_sqlite/microprotocols.c b/Modules/_sqlite/microprotocols.c
|
||
|
index 3d01872..7f98c2f 100644
|
||
|
--- a/Modules/_sqlite/microprotocols.c
|
||
|
+++ b/Modules/_sqlite/microprotocols.c
|
||
|
@@ -30,6 +30,10 @@
|
||
|
#include "microprotocols.h"
|
||
|
#include "prepare_protocol.h"
|
||
|
|
||
|
+#ifndef MODULE_NAME
|
||
|
+#define MODULE_NAME "sqlite"
|
||
|
+#endif
|
||
|
+
|
||
|
|
||
|
/** the adapters registry **/
|
||
|
|
||
|
diff --git a/Modules/_sqlite/module.c b/Modules/_sqlite/module.c
|
||
|
index 6befa07..4611574 100644
|
||
|
--- a/Modules/_sqlite/module.c
|
||
|
+++ b/Modules/_sqlite/module.c
|
||
|
@@ -33,6 +33,10 @@
|
||
|
#define HAVE_SHARED_CACHE
|
||
|
#endif
|
||
|
|
||
|
+#ifndef MODULE_NAME
|
||
|
+#define MODULE_NAME "sqlite"
|
||
|
+#endif
|
||
|
+
|
||
|
/* static objects at module-level */
|
||
|
|
||
|
PyObject *pysqlite_Error = NULL;
|
||
|
diff --git a/Modules/_sqlite/prepare_protocol.c b/Modules/_sqlite/prepare_protocol.c
|
||
|
index f2c85f9..14969bb 100644
|
||
|
--- a/Modules/_sqlite/prepare_protocol.c
|
||
|
+++ b/Modules/_sqlite/prepare_protocol.c
|
||
|
@@ -23,6 +23,10 @@
|
||
|
|
||
|
#include "prepare_protocol.h"
|
||
|
|
||
|
+#ifndef MODULE_NAME
|
||
|
+#define MODULE_NAME "sqlite"
|
||
|
+#endif
|
||
|
+
|
||
|
int pysqlite_prepare_protocol_init(pysqlite_PrepareProtocol* self, PyObject* args, PyObject* kwargs)
|
||
|
{
|
||
|
return 0;
|
||
|
diff --git a/Modules/_sqlite/row.c b/Modules/_sqlite/row.c
|
||
|
index ec2c788..ce65e62 100644
|
||
|
--- a/Modules/_sqlite/row.c
|
||
|
+++ b/Modules/_sqlite/row.c
|
||
|
@@ -24,6 +24,10 @@
|
||
|
#include "row.h"
|
||
|
#include "cursor.h"
|
||
|
|
||
|
+#ifndef MODULE_NAME
|
||
|
+#define MODULE_NAME "sqlite"
|
||
|
+#endif
|
||
|
+
|
||
|
void pysqlite_row_dealloc(pysqlite_Row* self)
|
||
|
{
|
||
|
Py_XDECREF(self->data);
|
||
|
diff --git a/Modules/_sqlite/statement.c b/Modules/_sqlite/statement.c
|
||
|
index 3869088..6d16049 100644
|
||
|
--- a/Modules/_sqlite/statement.c
|
||
|
+++ b/Modules/_sqlite/statement.c
|
||
|
@@ -28,6 +28,10 @@
|
||
|
#include "prepare_protocol.h"
|
||
|
#include "util.h"
|
||
|
|
||
|
+#ifndef MODULE_NAME
|
||
|
+#define MODULE_NAME "sqlite"
|
||
|
+#endif
|
||
|
+
|
||
|
/* prototypes */
|
||
|
static int pysqlite_check_remaining_sql(const char* tail);
|
||
|
|
||
|
diff --git a/Modules/_sqlite/util.c b/Modules/_sqlite/util.c
|
||
|
index 3fa671d..bd12f51 100644
|
||
|
--- a/Modules/_sqlite/util.c
|
||
|
+++ b/Modules/_sqlite/util.c
|
||
|
@@ -24,6 +24,10 @@
|
||
|
#include "module.h"
|
||
|
#include "connection.h"
|
||
|
|
||
|
+#ifndef MODULE_NAME
|
||
|
+#define MODULE_NAME "sqlite"
|
||
|
+#endif
|
||
|
+
|
||
|
int pysqlite_step(sqlite3_stmt* statement, pysqlite_Connection* connection)
|
||
|
{
|
||
|
int rc;
|