@@ -116,6 +116,20 @@ autocommit_converter(PyObject *val, enum autocommit_mode *result)
116
116
return 0 ;
117
117
}
118
118
119
+ static int
120
+ sqlite3_int64_converter (PyObject * obj , sqlite3_int64 * result )
121
+ {
122
+ if (!PyLong_Check (obj )) {
123
+ PyErr_SetString (PyExc_TypeError , "expected 'int'" );
124
+ return 0 ;
125
+ }
126
+ * result = _pysqlite_long_as_int64 (obj );
127
+ if (PyErr_Occurred ()) {
128
+ return 0 ;
129
+ }
130
+ return 1 ;
131
+ }
132
+
119
133
#define clinic_state () (pysqlite_get_state_by_type(Py_TYPE(self)))
120
134
#include "clinic/connection.c.h"
121
135
#undef clinic_state
@@ -186,8 +200,12 @@ class Autocommit_converter(CConverter):
186
200
type = "enum autocommit_mode"
187
201
converter = "autocommit_converter"
188
202
203
+ class sqlite3_int64_converter(CConverter):
204
+ type = "sqlite3_int64"
205
+ converter = "sqlite3_int64_converter"
206
+
189
207
[python start generated code]*/
190
- /*[python end generated code: output=da39a3ee5e6b4b0d input=bc2aa6c7ba0c5f8f ]*/
208
+ /*[python end generated code: output=da39a3ee5e6b4b0d input=dff8760fb1eba6a1 ]*/
191
209
192
210
// NB: This needs to be in sync with the sqlite3.connect docstring
193
211
/*[clinic input]
@@ -481,7 +499,7 @@ _sqlite3.Connection.blobopen as blobopen
481
499
Table name.
482
500
column as col: str
483
501
Column name.
484
- row: int
502
+ row: sqlite3_int64
485
503
Row index.
486
504
/
487
505
*
@@ -495,8 +513,8 @@ Open and return a BLOB object.
495
513
496
514
static PyObject *
497
515
blobopen_impl (pysqlite_Connection * self , const char * table , const char * col ,
498
- int row , int readonly , const char * name )
499
- /*[clinic end generated code: output=0c8e2e58516d0b5c input=fa73c83aa7a7ddee ]*/
516
+ sqlite3_int64 row , int readonly , const char * name )
517
+ /*[clinic end generated code: output=6a02d43efb885d1c input=23576bd1108d8774 ]*/
500
518
{
501
519
if (!pysqlite_check_thread (self ) || !pysqlite_check_connection (self )) {
502
520
return NULL ;
0 commit comments