@@ -92,6 +92,20 @@ isolation_level_converter(PyObject *str_or_none, const char **result)
92
92
return 1 ;
93
93
}
94
94
95
+ static int
96
+ sqlite3_int64_converter (PyObject * obj , sqlite3_int64 * result )
97
+ {
98
+ if (!PyLong_Check (obj )) {
99
+ PyErr_SetString (PyExc_TypeError , "expected 'int'" );
100
+ return 0 ;
101
+ }
102
+ * result = _pysqlite_long_as_int64 (obj );
103
+ if (PyErr_Occurred ()) {
104
+ return 0 ;
105
+ }
106
+ return 1 ;
107
+ }
108
+
95
109
#define clinic_state () (pysqlite_get_state_by_type(Py_TYPE(self)))
96
110
#include "clinic/connection.c.h"
97
111
#undef clinic_state
@@ -137,8 +151,12 @@ class IsolationLevel_converter(CConverter):
137
151
type = "const char *"
138
152
converter = "isolation_level_converter"
139
153
154
+ class sqlite3_int64_converter(CConverter):
155
+ type = "sqlite3_int64"
156
+ converter = "sqlite3_int64_converter"
157
+
140
158
[python start generated code]*/
141
- /*[python end generated code: output=da39a3ee5e6b4b0d input=cbcfe85b253061c2 ]*/
159
+ /*[python end generated code: output=da39a3ee5e6b4b0d input=e9bee126e0500e61 ]*/
142
160
143
161
// NB: This needs to be in sync with the sqlite3.connect docstring
144
162
/*[clinic input]
@@ -401,7 +419,7 @@ _sqlite3.Connection.blobopen as blobopen
401
419
Table name.
402
420
column as col: str
403
421
Column name.
404
- row: int
422
+ row: sqlite3_int64
405
423
Row index.
406
424
/
407
425
*
@@ -415,8 +433,8 @@ Open and return a BLOB object.
415
433
416
434
static PyObject *
417
435
blobopen_impl (pysqlite_Connection * self , const char * table , const char * col ,
418
- int row , int readonly , const char * name )
419
- /*[clinic end generated code: output=0c8e2e58516d0b5c input=1e7052516acfc94d ]*/
436
+ sqlite3_int64 row , int readonly , const char * name )
437
+ /*[clinic end generated code: output=6a02d43efb885d1c input=4180b11a0591d80d ]*/
420
438
{
421
439
if (!pysqlite_check_thread (self ) || !pysqlite_check_connection (self )) {
422
440
return NULL ;
0 commit comments