Skip to content
This repository has been archived by the owner on Apr 18, 2021. It is now read-only.

Commit

Permalink
added extension suppor to API
Browse files Browse the repository at this point in the history
  • Loading branch information
ttilley authored and Jakub Kuźma committed Feb 9, 2010
1 parent 7981156 commit d5acdc2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/sqlite3/api.rb
Expand Up @@ -40,5 +40,13 @@ module API
attach_function :sqlite3_prepare, [:pointer, :string, :int, :pointer, :pointer], :int
attach_function :sqlite3_reset, [:pointer], :int
attach_function :sqlite3_step, [:pointer], :int

begin
attach_function :sqlite3_enable_load_extension, [:pointer, :int], :int
attach_function :sqlite3_load_extension, [:pointer, :string, :string, :string], :int
EXTENSION_SUPPORT = true
rescue FFI::NotFoundError
EXTENSION_SUPPORT = false
end
end
end

0 comments on commit d5acdc2

Please sign in to comment.