Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed sqlite amalgamation v3.45.1 source code #63

Merged
merged 3 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Plugins/VendorSQLite/VendorSQLite3.swift
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,13 @@ struct VendorSQLite: CommandPlugin {
let writer = try FileHandle(forWritingTo: outputFile.fileUrl)
defer { try? writer.close() }

Diagnostics.verbose("Prefixing symbols in \(file.lastComponent)...")
let minimalCommonPrefix = symbols.reduce(symbols[0]) { $1.commonPrefix(with: $0, options: .literal)[...] }

Diagnostics.verbose("Prefixing symbols in \(file.lastComponent) (minimum prefix \(minimalCommonPrefix))...")
for try await line in reader.bytes.keepingEmptySubsequencesLines {
let oline = line.isEmpty ? "" : symbols.reduce(line, { $0.replacingOccurrences(of: $1, with: "\(Self.vendorPrefix)_\($1)") })
let oline = line.contains(minimalCommonPrefix) ?
symbols.reduce(line, { $0.replacingOccurrences(of: $1, with: "\(Self.vendorPrefix)_\($1)") }) :
line

try writer.write(contentsOf: Array("\(oline)\n".utf8))
}
Expand Down
6 changes: 3 additions & 3 deletions Sources/CSQLite/include/sqlite_nio_sqlite3.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ extern "C" {
** [sqlite_nio_sqlite3_libversion_number()], [sqlite_nio_sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
#define SQLITE_VERSION "3.45.0"
#define SQLITE_VERSION_NUMBER 3045000
#define SQLITE_SOURCE_ID "2024-01-15 17:01:13 1066602b2b1976fe58b5150777cced894af17c803e068f5918390d6915b46e1d"
#define SQLITE_VERSION "3.45.1"
#define SQLITE_VERSION_NUMBER 3045001
#define SQLITE_SOURCE_ID "2024-01-30 16:01:20 e876e51a0ed5c5b3126f52e532044363a014bc594cfefa87ffb5b82257cc467a"

/*
** CAPI3REF: Run-Time Library Version Numbers
Expand Down
Loading
Loading