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