~blainsmith/public-inbox

hare-sqlite: Build with recent Hare v1 APPROVED

Carlos Une: 1
 Build with recent Hare

 2 files changed, 5 insertions(+), 5 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~blainsmith/public-inbox/patches/40117/mbox | git am -3
Learn more about email & git

[PATCH hare-sqlite] Build with recent Hare Export this patch

Signed-off-by: Carlos Une <une@fastmail.fm>
---
 sqlite/handle.ha    | 4 ++--
 sqlite/statement.ha | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sqlite/handle.ha b/sqlite/handle.ha
index 5d0c544..f66f28a 100644
--- a/sqlite/handle.ha
+++ b/sqlite/handle.ha
@@ -49,5 +49,5 @@ export fn close(h: *handle) (void | error) = {
// 
// https://sqlite.org/c3ref/libversion.html
export fn version() const str = {
	return strings::fromc(_version());
};
\ No newline at end of file
	return strings::fromc_unsafe(_version());
};
diff --git a/sqlite/statement.ha b/sqlite/statement.ha
index 4a44201..8a942f2 100644
--- a/sqlite/statement.ha
+++ b/sqlite/statement.ha
@@ -119,7 +119,7 @@ export fn finalize(s: *statement) (void | error) = {
// 
// https://sqlite.org/c3ref/column_name.html
export fn column_name(s: *statement, col: int) str = {
	return strings::fromc(_column_name(s.stmt, col));
	return strings::fromc_unsafe(_column_name(s.stmt, col));
};

@symbol("sqlite3_column_type") fn _column_type(stmt: nullable *void, col: int) int;
@@ -162,7 +162,7 @@ export fn column_float(s: *statement, col: int) f64 = {
// 
// https://sqlite.org/c3ref/column_blob.html
export fn column_str(s: *statement, col: int) str = {
	return strings::fromc(_column_str(s.stmt, col));
	return strings::fromc_unsafe(_column_str(s.stmt, col));
};

@symbol("sqlite3_column_blob") fn _column_blob(stmt: nullable *void, col: int) const *void;
@@ -185,4 +185,4 @@ export fn column_byte_slice(s: *statement, col: int) []u8 = {
	let buf: []u8 = blob[..sz];
	
	return buf;
};
\ No newline at end of file
};
-- 
2.30.2