1
0
Fork 0
mirror of https://github.com/DBD-SQLite/DBD-SQLite synced 2025-06-07 14:19:10 -04:00

added a script to see which API was introduced when

This commit is contained in:
Kenichi Ishigaki 2015-03-19 02:19:34 +09:00
parent 305d556b5b
commit c3571f0c11

33
util/api_history.pl Normal file
View file

@ -0,0 +1,33 @@
#!/usr/bin/perl
use strict;
use warnings;
use FindBin;
use lib "$FindBin::Bin";
use SQLiteUtil;
use Array::Diff;
my %current;
for my $version (versions()) {
print "checking $version...\n";
my $dir = srcdir($version);
unless ($dir && -d $dir) {
$dir = mirror($version) or next;
}
my %constants = extract_constants("$dir/sqlite3.h");
if (%current) {
for (sort keys %current) {
print "$version: deleted $_\n" if !exists $constants{$_};
}
for (sort keys %constants) {
if (!exists $current{$_}) {
print "$version: added $_\n";
next;
}
my $diff = Array::Diff->diff($current{$_}, $constants{$_});
print "$version: added $_\n" for @{$diff->added || []};
print "$version: deleted $_\n" for @{$diff->deleted || []};
}
}
%current = %constants;
}