Permalink
Browse files

Merge branch 'master' of git@github.com:copiousfreetime/amalgalite

  • Loading branch information...
2 parents cec6ad7 + 4004ba5 commit 1b3e3e13be5f2701c63532aa059267fd087fec29 @copiousfreetime committed Oct 28, 2009
Showing with 53 additions and 0 deletions.
  1. +53 −0 tasks/extension.rake
View
@@ -91,6 +91,59 @@ if ext_config = Configuration.for_if_exist?('extension') then
end
end
+ desc "List the sqlite api calls that are not implemented"
+ task :todo do
+
+ not_implementing = %w[
+ sqlite3_exec
+ sqlite3_open
+ sqlite3_os_end
+ sqlite3_os_init
+ sqlite3_malloc
+ sqlite3_realloc
+ sqlite3_free
+ sqlite3_get_table
+ sqlite3_free_table
+ sqlite3_key
+ sqlite3_rekey
+ sqlite3_next_stmt
+ sqlite3_release_memory
+ sqlite3_sleep
+ sqlite3_snprintf
+ sqlite3_vmprintf
+ sqlite3_strnicmp
+ sqlite3_test_control
+ sqlite3_unlock_notify
+ sqlite3_vfs_find
+ sqlite3_vfs_register
+ sqlite3_vfs_unregister
+ ]
+
+ sqlite_h = File.join( *%w[ ext amalgalite sqlite3.h ] )
+ api_todo = {}
+ IO.readlines( sqlite_h ).each do |line|
+ if line =~ /\ASQLITE_API/ then
+ if line !~ /SQLITE_DEPRECATED/ and line !~ /SQLITE_EXPERIMENTAL/ then
+ if md = line.match( /(sqlite3_[^(\s]+)\(/ ) then
+ next if not_implementing.include?(md.captures[0])
+ api_todo[md.captures[0]] = true
+ end
+ end
+ end
+ end
+
+ Dir.glob("ext/amalgalite/amalgalite*.c").each do |am_file|
+ IO.readlines( am_file ).each do |am_line|
+ if md = am_line.match( /(sqlite3_[^(\s]+)\(/ ) then
+ api_todo.delete( md.captures[0] )
+ end
+ end
+ end
+
+ puts "#{api_todo.keys.size} functions to still implement"
+ puts api_todo.keys.sort.join("\n")
+ end
+
task :clobber do
ext_config.configs.each do |extension|
path = Pathname.new(extension)

0 comments on commit 1b3e3e1

Please sign in to comment.