@@ -192,6 +192,8 @@ module sqlite3
192192 public :: sqlite3_clear_bindings
193193 public :: sqlite3_close
194194 public :: sqlite3_close_
195+ public :: sqlite3_close_v2
196+ public :: sqlite3_close_v2_
195197 public :: sqlite3_column_count
196198 public :: sqlite3_column_double
197199 public :: sqlite3_column_int
@@ -421,6 +423,14 @@ function sqlite3_close_(db) bind(c, name='sqlite3_close')
421423 integer (kind= c_int) :: sqlite3_close_
422424 end function sqlite3_close_
423425
426+ ! int sqlite3_close_v2(sqlite3 *db)
427+ function sqlite3_close_v2_ (db ) bind(c, name= ' sqlite3_close_v2' )
428+ import :: c_int, c_ptr
429+ implicit none
430+ type (c_ptr), intent (in ), value :: db
431+ integer (kind= c_int) :: sqlite3_close_v2_
432+ end function sqlite3_close_v2_
433+
424434 ! int sqlite3_column_count(sqlite3_stmt *stmt)
425435 function sqlite3_column_count (stmt ) bind(c, name= ' sqlite3_column_count' )
426436 import :: c_int, c_ptr
@@ -957,6 +967,14 @@ function sqlite3_close(db)
957967 if (sqlite3_close == SQLITE_OK) db = c_null_ptr
958968 end function sqlite3_close
959969
970+ function sqlite3_close_v2 (db )
971+ type (c_ptr), intent (inout ) :: db
972+ integer :: sqlite3_close_v2
973+
974+ sqlite3_close_v2 = sqlite3_close_v2_(db)
975+ if (sqlite3_close_v2 == SQLITE_OK) db = c_null_ptr
976+ end function sqlite3_close_v2
977+
960978 function sqlite3_column_name (stmt , idx )
961979 type (c_ptr), intent (inout ) :: stmt
962980 integer , intent (in ) :: idx
0 commit comments