@@ -358,53 +358,53 @@ function sqlite3_close_(db) bind(c, name='sqlite3_close')
358
358
integer (kind= c_int) :: sqlite3_close_
359
359
end function sqlite3_close_
360
360
361
- ! double sqlite3_column_double(sqlite3_stmt *stmt, int icol )
362
- function sqlite3_column_double (stmt , icol ) bind(c, name= ' sqlite3_column_double' )
361
+ ! double sqlite3_column_double(sqlite3_stmt *stmt, int idx )
362
+ function sqlite3_column_double (stmt , idx ) bind(c, name= ' sqlite3_column_double' )
363
363
import :: c_double, c_int, c_ptr
364
364
implicit none
365
365
type (c_ptr), intent (in ), value :: stmt
366
- integer (kind= c_int), intent (in ), value :: icol
366
+ integer (kind= c_int), intent (in ), value :: idx
367
367
real (kind= c_double) :: sqlite3_column_double
368
368
end function sqlite3_column_double
369
369
370
- ! int sqlite3_column_int(sqlite3_stmt *stmt, int icol )
371
- function sqlite3_column_int (stmt , icol ) bind(c, name= ' sqlite3_column_int' )
370
+ ! int sqlite3_column_int(sqlite3_stmt *stmt, int idx )
371
+ function sqlite3_column_int (stmt , idx ) bind(c, name= ' sqlite3_column_int' )
372
372
import :: c_int, c_ptr
373
373
implicit none
374
374
type (c_ptr), intent (in ), value :: stmt
375
- integer (kind= c_int), intent (in ), value :: icol
375
+ integer (kind= c_int), intent (in ), value :: idx
376
376
integer (kind= c_int) :: sqlite3_column_int
377
377
end function sqlite3_column_int
378
378
379
- ! sqlite3_int64 sqlite3_column_int64(sqlite3_stmt *stmt, int icol )
380
- function sqlite3_column_int64 (stmt , icol ) bind(c, name= ' sqlite3_column_int64' )
379
+ ! sqlite3_int64 sqlite3_column_int64(sqlite3_stmt *stmt, int idx )
380
+ function sqlite3_column_int64 (stmt , idx ) bind(c, name= ' sqlite3_column_int64' )
381
381
import :: c_int, c_int64_t, c_ptr
382
382
implicit none
383
383
type (c_ptr), intent (in ), value :: stmt
384
- integer (kind= c_int), intent (in ), value :: icol
384
+ integer (kind= c_int), intent (in ), value :: idx
385
385
integer (kind= c_int) :: sqlite3_column_int64
386
386
end function sqlite3_column_int64
387
387
388
- ! const unsigned char *sqlite3_column_text(sqlite3_stmt *stmt, int icol )
389
- function sqlite3_column_text_ (stmt , icol ) bind(c, name= ' sqlite3_column_text' )
388
+ ! const unsigned char *sqlite3_column_text(sqlite3_stmt *stmt, int idx )
389
+ function sqlite3_column_text_ (stmt , idx ) bind(c, name= ' sqlite3_column_text' )
390
390
import :: c_int, c_ptr
391
391
implicit none
392
392
type (c_ptr), intent (in ), value :: stmt
393
- integer (kind= c_int), intent (in ), value :: icol
393
+ integer (kind= c_int), intent (in ), value :: idx
394
394
type (c_ptr) :: sqlite3_column_text_
395
395
end function sqlite3_column_text_
396
396
397
- ! int sqlite3_column_type(sqlite3_stmt *stmt, int icol )
398
- function sqlite3_column_type (stmt , icol ) bind(c, name= ' sqlite3_column_type' )
397
+ ! int sqlite3_column_type(sqlite3_stmt *stmt, int idx )
398
+ function sqlite3_column_type (stmt , idx ) bind(c, name= ' sqlite3_column_type' )
399
399
import :: c_int, c_ptr
400
400
implicit none
401
401
type (c_ptr), intent (in ), value :: stmt
402
- integer (kind= c_int), intent (in ), value :: icol
402
+ integer (kind= c_int), intent (in ), value :: idx
403
403
integer (kind= c_int) :: sqlite3_column_type
404
404
end function sqlite3_column_type
405
405
406
- ! int sqlite3_config (int option, ... )
407
- function sqlite3_config_funptr_ptr_ (option , funptr , ptr ) bind(c, name= ' sqlite3_config ' )
406
+ ! int sqlite3_config_funptr_ptr_ (int option, void *funptr, void *ptr )
407
+ function sqlite3_config_funptr_ptr_ (option , funptr , ptr ) bind(c, name= ' sqlite3_config_funptr_ptr_ ' )
408
408
import :: c_funptr, c_int, c_ptr
409
409
implicit none
410
410
integer (kind= c_int), intent (in ), value :: option
@@ -413,17 +413,17 @@ function sqlite3_config_funptr_ptr_(option, funptr, ptr) bind(c, name='sqlite3_c
413
413
integer (kind= c_int) :: sqlite3_config_funptr_ptr_
414
414
end function sqlite3_config_funptr_ptr_
415
415
416
- ! int sqlite3_config (int option, ... )
417
- function sqlite3_config_int_ (option , arg ) bind(c, name= ' sqlite3_config ' )
416
+ ! int sqlite3_config_int_ (int option, int arg )
417
+ function sqlite3_config_int_ (option , arg ) bind(c, name= ' sqlite3_config_int_ ' )
418
418
import :: c_int
419
419
implicit none
420
420
integer (kind= c_int), intent (in ), value :: option
421
421
integer (kind= c_int), intent (in ), value :: arg
422
422
integer (kind= c_int) :: sqlite3_config_int_
423
423
end function sqlite3_config_int_
424
424
425
- ! int sqlite3_config (int option, ... )
426
- function sqlite3_config_null_ (option ) bind(c, name= ' sqlite3_config ' )
425
+ ! int sqlite3_config_null_ (int option)
426
+ function sqlite3_config_null_ (option ) bind(c, name= ' sqlite3_config_null_ ' )
427
427
import :: c_int
428
428
implicit none
429
429
integer (kind= c_int), intent (in ), value :: option
@@ -703,12 +703,12 @@ subroutine sqlite3_free(ptr) bind(c, name='sqlite3_free')
703
703
type (c_ptr), intent (in ), value :: ptr
704
704
end subroutine sqlite3_free
705
705
706
- ! void sqlite3_log (int iErrCode, const char *zFormat, ... )
707
- subroutine sqlite3_log_ (ierr_code , zformat ) bind(c, name= ' sqlite3_log ' )
706
+ ! void sqlite3_log_ (int iErrCode, const char *str )
707
+ subroutine sqlite3_log_ (ierr_code , str ) bind(c, name= ' sqlite3_log_ ' )
708
708
import :: c_char, c_int
709
709
implicit none
710
710
integer (kind= c_int), intent (in ), value :: ierr_code
711
- character (kind= c_char), intent (in ) :: zformat
711
+ character (kind= c_char), intent (in ) :: str
712
712
end subroutine sqlite3_log_
713
713
714
714
! void sqlite3_str_append(sqlite3_str *str, const char *zIn, int N)
@@ -789,13 +789,13 @@ function sqlite3_close(db)
789
789
if (sqlite3_close == SQLITE_OK) db = c_null_ptr
790
790
end function sqlite3_close
791
791
792
- function sqlite3_column_text (stmt , icol )
792
+ function sqlite3_column_text (stmt , idx )
793
793
type (c_ptr), intent (inout ) :: stmt
794
- integer , intent (in ) :: icol
795
- type (c_ptr) :: ptr
794
+ integer , intent (in ) :: idx
796
795
character (len= :), allocatable :: sqlite3_column_text
796
+ type (c_ptr) :: ptr
797
797
798
- ptr = sqlite3_column_text_(stmt, icol )
798
+ ptr = sqlite3_column_text_(stmt, idx )
799
799
if (.not. c_associated(ptr)) return
800
800
call c_f_str_ptr(ptr, sqlite3_column_text)
801
801
end function sqlite3_column_text
@@ -831,7 +831,7 @@ function sqlite3_db_name(db, n)
831
831
type (c_ptr) :: ptr
832
832
833
833
ptr = sqlite3_db_name_(db, n)
834
- if (c_associated(ptr)) call c_f_str_ptr(ptr, sqlite3_db_name)
834
+ call c_f_str_ptr(ptr, sqlite3_db_name)
835
835
end function sqlite3_db_name
836
836
837
837
function sqlite3_errmsg (db )
@@ -840,7 +840,7 @@ function sqlite3_errmsg(db)
840
840
type (c_ptr) :: ptr
841
841
842
842
ptr = sqlite3_errmsg_(db)
843
- if (c_associated(ptr)) call c_f_str_ptr(ptr, sqlite3_errmsg)
843
+ call c_f_str_ptr(ptr, sqlite3_errmsg)
844
844
end function sqlite3_errmsg
845
845
846
846
function sqlite3_exec (db , sql , callback , client_data , errmsg )
@@ -853,7 +853,6 @@ function sqlite3_exec(db, sql, callback, client_data, errmsg)
853
853
type (c_ptr) :: ptr
854
854
855
855
sqlite3_exec = sqlite3_exec_(db, sql // c_null_char, callback, client_data, ptr)
856
- if (.not. c_associated(ptr)) return
857
856
if (present (errmsg)) call c_f_str_ptr(ptr, errmsg)
858
857
end function sqlite3_exec
859
858
@@ -870,7 +869,6 @@ function sqlite3_libversion()
870
869
character (len= :), allocatable :: sqlite3_libversion
871
870
872
871
ptr = sqlite3_libversion_()
873
- if (.not. c_associated(ptr)) return
874
872
call c_f_str_ptr(ptr, sqlite3_libversion)
875
873
end function sqlite3_libversion
876
874
@@ -920,7 +918,6 @@ function sqlite3_sourceid()
920
918
character (len= :), allocatable :: sqlite3_sourceid
921
919
922
920
ptr = sqlite3_sourceid_()
923
- if (.not. c_associated(ptr)) return
924
921
call c_f_str_ptr(ptr, sqlite3_sourceid)
925
922
end function sqlite3_sourceid
926
923
@@ -930,14 +927,13 @@ function sqlite3_str_value(str)
930
927
character (len= :), allocatable :: sqlite3_str_value
931
928
932
929
ptr = sqlite3_str_value_(str)
933
- if (.not. c_associated(ptr)) return
934
930
call c_f_str_ptr(ptr, sqlite3_str_value)
935
931
end function sqlite3_str_value
936
932
937
- subroutine sqlite3_log (ierr_code , zformat )
933
+ subroutine sqlite3_log (ierr_code , str )
938
934
integer , intent (in ) :: ierr_code
939
- character (len=* ), intent (in ) :: zformat
935
+ character (len=* ), intent (in ) :: str
940
936
941
- call sqlite3_log_(ierr_code, zformat // c_null_char)
937
+ call sqlite3_log_(ierr_code, str // c_null_char)
942
938
end subroutine sqlite3_log
943
939
end module sqlite3
0 commit comments