Simplify the filter format, and actually run the filter.

This commit is contained in:
Eric Fischer
2017-08-28 13:42:14 -07:00
parent 7be21f6046
commit 5878213516
7 changed files with 49 additions and 19 deletions
+2 -2
View File
@@ -69,7 +69,7 @@ json_pull *json_begin_file(FILE *f) {
}
static ssize_t read_string(json_pull *j, char *buffer, size_t n) {
char *cp = j->source;
const char *cp = j->source;
size_t out = 0;
while (out < n && cp[out] != '\0') {
@@ -81,7 +81,7 @@ static ssize_t read_string(json_pull *j, char *buffer, size_t n) {
return out;
}
json_pull *json_begin_string(char *s) {
json_pull *json_begin_string(const char *s) {
return json_begin(read_string, s);
}