Fun 0.41.5
The programming language that makes You have fun
Loading...
Searching...
No Matches
close.c
Go to the documentation of this file.
1/*
2 * This file is part of the Fun programming language.
3 * https://fun-lang.xyz/
4 *
5 * Copyright 2025 Johannes Findeisen <you@hanez.org>
6 * Licensed under the terms of the Apache-2.0 license.
7 * https://opensource.org/license/apache-2-0
8 */
9
17
22#ifdef FUN_WITH_SQLITE
23 Value vh = pop_value(vm);
24 int hid = (int)vh.i;
26 SqlHandle *h = sql_reg_get(hid);
27 if (h && h->db) {
28 sqlite3_close(h->db);
29 h->db = NULL;
30 sql_reg_del(hid);
31 }
32 push_value(vm, make_nil());
33#else
34 Value v = pop_value(vm);
37#endif
38 break;
39}
@ OP_SQLITE_CLOSE
Definition bytecode.h:179
Value v
Definition cast.c:22
push_value(vm, make_nil())
free_value(v)
Tagged union representing a Fun value.
Definition value.h:68
Value vh
Definition stubs.c:44
Value make_nil(void)
Construct a nil Value.
Definition value.c:126