Fixup API to get closer to a libjq

This commit is contained in:
Nicolas Williams committed 2013-06-15 17:37:15 -05:00
1 parent 69fa279e3c
commit 3f86e97f70
8 files changed
+203 -75

No files matched your search

+7 -6
View File
@@ -2,19 +2,20 @@
#define EXECUTE_H
#include "bytecode.h"
typedef struct jq_state jq_state;
struct bytecode* jq_compile(const char* str);
int jq_compile(jq_state *, const char* str);
/* args must be an array of the form [{name:"foo", value:"thing"}, {name:"bar",value:3}] */
struct bytecode* jq_compile_args(const char* str, jv args);
int jq_compile_args(jq_state *, const char* str, jv args);
typedef struct jq_state jq_state;
enum {JQ_DEBUG_TRACE = 1};
void jq_init(struct bytecode* bc, jv value, jq_state **, int flags);
jq_state *jq_init(void);
void jq_set_nomem_handler(jq_state *, void (*)(void *), void *);
void jq_start(jq_state *, jv value, int flags);
jv jq_next(jq_state *);
void jq_teardown(jq_state **);
void jq_dump_disassembly(jq_state *, int);
#endif