@@ -202,20 +202,30 @@ end
202
202
# SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
203
203
204
204
function sqlite3_close (handle:: Ptr{Void} )
205
- @windows_only return ccall ( (:sqlite3_close , sqlite3_lib), stdcall,
205
+ try
206
+ @windows_only return ccall ( (:sqlite3_close , sqlite3_lib), stdcall,
207
+ Cint, (Ptr{Void},),
208
+ handle)
209
+ @unix_only return ccall ( (:sqlite3_close , sqlite3_lib),
206
210
Cint, (Ptr{Void},),
207
211
handle)
208
- @unix_only return ccall ( ( :sqlite3_close , sqlite3_lib),
209
- Cint, (Ptr{Void},),
210
- handle)
212
+ catch
213
+ warn ( " sqlite3_close not available " )
214
+ end
211
215
end
212
216
function sqlite3_close_v2 (handle:: Ptr{Void} )
213
- @windows_only return ccall ( (:sqlite3_close_v2 , sqlite3_lib), stdcall,
217
+ try
218
+ @windows_only return ccall ( (:sqlite3_close_v2 , sqlite3_lib), stdcall,
219
+ Cint, (Ptr{Void},),
220
+ handle)
221
+ @unix_only return ccall ( (:sqlite3_close_v2 , sqlite3_lib),
214
222
Cint, (Ptr{Void},),
215
223
handle)
216
- @unix_only return ccall ( (:sqlite3_close_v2 , sqlite3_lib),
217
- Cint, (Ptr{Void},),
218
- handle)
224
+ catch
225
+ # Older versions of the library don't have this, abort to other close
226
+ warn (" sqlite3_close_v2 not available." )
227
+ sqlite3_close (handle)
228
+ end
219
229
end
220
230
function sqlite3_initialize ()
221
231
@windows_only return ccall ( (:sqlite3_initialize , sqlite3_lib), stdcall,
0 commit comments