1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-14 23:37:40 +00:00

Add ability to index into structs and dictionaries generically.

This commit is contained in:
Calvin Rose
2018-09-09 12:13:32 -04:00
parent 08dd06918e
commit 56c3b8aa94
7 changed files with 66 additions and 46 deletions

View File

@@ -77,8 +77,7 @@ static int sql_open(JanetArgs args) {
static int sql_close(JanetArgs args) {
Db *db;
JANET_FIXARITY(args, 1);
JANET_CHECKABSTRACT(args, 0, &sql_conn_type);
db = (Db *)janet_unwrap_abstract(args.v[0]);
JANET_ARG_ABSTRACT(db, args, 0, &sql_conn_type);
closedb(db);
JANET_RETURN_NIL(args);
}