Added library system with -l, -L, and JQ_LIBRARY_PATH
Created util.[ch] to hold common utilities.
This commit is contained in:
1 parent
01fc8168e9
commit
38b939688a
19 files changed
+690
-79
No files matched your search
@@ -991,14 +991,14 @@ static const char* const jq_builtins[] = {
|
||||
|
||||
|
||||
static int builtins_bind_one(jq_state *jq, block* bb, const char* code) {
|
||||
struct locfile src;
|
||||
locfile_init(&src, jq, code, strlen(code));
|
||||
struct locfile* src;
|
||||
src = locfile_init(jq, code, strlen(code));
|
||||
block funcs;
|
||||
int nerrors = jq_parse_library(&src, &funcs);
|
||||
int nerrors = jq_parse_library(src, &funcs);
|
||||
if (nerrors == 0) {
|
||||
*bb = block_bind_referenced(funcs, *bb, OP_IS_CALL_PSEUDO);
|
||||
}
|
||||
locfile_free(&src);
|
||||
locfile_free(src);
|
||||
return nerrors;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user