better closing checks (#23)

This commit is contained in:
Benoist 2017-05-29 20:20:32 +02:00 committed by Brian J. Cardiff
parent 5eb85a98c6
commit 616af3ba1d
4 changed files with 4 additions and 3 deletions

View file

@ -6,4 +6,4 @@ before_install:
- sudo apt-get -y update
- sudo apt-cache show sqlite3
- sudo apt-get install sqlite3=3.7.15.1-1~travis1
- sudo sqlite3 -version
- sudo sqlite3 -version

View file

@ -32,7 +32,7 @@ class SQLite3::Connection < DB::Connection
def do_close
super
LibSQLite3.close_v2(self)
check LibSQLite3.close(self)
end
# :nodoc:

View file

@ -48,4 +48,5 @@ lib LibSQLite3
fun finalize = sqlite3_finalize(stmt : Statement) : Int32
fun close_v2 = sqlite3_close_v2(SQLite3) : Int32
fun close = sqlite3_close(SQLite3) : Int32
end

View file

@ -28,7 +28,7 @@ class SQLite3::Statement < DB::Statement
DB::ExecResult.new rows_affected, last_id
end
protected def on_close
protected def do_close
super
check LibSQLite3.finalize(self)
end