Skip to content
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
17 changes: 6 additions & 11 deletions .github/workflows/lspec.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
name: "LSpec CI"

on:
pull_request:
push:
branches:
- master
workflow_dispatch:

jobs:
build:
name: Build
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-24.11
- name: Install Lean
run: nix-shell
- name: Log versions
run: nix-shell --run "lean --version && lake --version"
- name: run LSpec binary
run: nix-shell --run "lake exe lspec"
- uses: actions/checkout@v5
- uses: leanprover/lean-action@v1
9 changes: 0 additions & 9 deletions native/sqliteffi.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include <lean/lean.h>
#include <sqlite3.h>
#include <stdio.h>

lean_external_class* g_sqlite_connection_external_class = NULL;
lean_external_class* g_sqlite_cursor_external_class = NULL;
Expand All @@ -26,16 +25,12 @@ sqlite3_stmt* unbox_cursor(lean_object* o) {
void connection_finalize(void* conn) {
if (!conn) return;

printf("connection_finalize: %x\n", conn);

sqlite3_close(conn);
}

void cursor_finalize(void* cursor) {
if (!cursor) return;

printf("cursor_finalize: %x\n", cursor);

sqlite3_finalize(cursor);
}

Expand All @@ -49,8 +44,6 @@ lean_obj_res lean_sqlite_open(b_lean_obj_arg path, uint32_t flags) {
const char* path_str = lean_string_cstr(path);
sqlite3* conn = malloc(sizeof(sqlite3*));

printf("initialize_connection: %x\n", conn);

int32_t c = sqlite3_open_v2(path_str, &conn, flags, NULL);

if (c == SQLITE_OK)
Expand All @@ -69,8 +62,6 @@ lean_obj_res lean_sqlite_prepare(b_lean_obj_arg conn_box, b_lean_obj_arg query_s

sqlite3_stmt* cursor = malloc(sizeof(sqlite3_stmt*));

printf("initialize_cursor: %x\n", cursor);

int32_t c = sqlite3_prepare_v2(conn, query, -1, &cursor, NULL);

if (c != SQLITE_OK) {
Expand Down