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

Add some test code and fix sqlite3 native example.

This commit is contained in:
Calvin Rose
2018-05-17 13:34:11 -04:00
parent ed9037e603
commit c0e373f420
5 changed files with 45 additions and 17 deletions

View File

@@ -88,10 +88,10 @@ static int sql_sql(DstArgs args) {
const uint8_t *str;
DstArray *rows;
sqlite3 **conn;
dst_fixarity(args, 2);
dst_checkabstract(args, 0, &sql_conn_type);
DST_FIXARITY(args, 2);
DST_CHECKABSTRACT(args, 0, &sql_conn_type);
conn = (sqlite3 **)dst_unwrap_abstract(args.v[0]);
dst_arg_string(str, args, 1);
DST_ARG_STRING(str, args, 1);
rows = dst_array(10);
status = sqlite3_exec(
*conn,