diff --git a/README.md b/README.md index 38543bc..fbf4148 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,6 @@ Things that may or may not happen: - FU::JSON - JSON::{XS,PP,etc}-compatible wrapper around FU::Util's JSON functions? I prolly won't need this myself, but could be handy. - FU::Log - Basic logger. - FU::PG - PostgreSQL client with support for custom types and a small query builder. -- FU::Util additions: `uri_escape`, `scrypt`, `urandom`. +- FU::Util additions: `uri_escape`, `VNDB::Util::query_encode`, `scrypt`, `urandom`. - FU::Validate - TUWF::Validate & normalization with some improvements. - FU::XML - TUWF::XMLXS with some improvements. diff --git a/c/jsonparse.c b/c/jsonparse.c index 3b9d43f..a2d594a 100644 --- a/c/jsonparse.c +++ b/c/jsonparse.c @@ -15,7 +15,7 @@ static void fujson_parse_ws(pTHX_ fujson_parse_ctx *ctx) { } } -static inline int fujson_parse_string_escape(fujson_parse_ctx *ctx, fustr *r) { +static inline int fujson_parse_string_escape(pTHX_ fujson_parse_ctx *ctx, fustr *r) { unsigned int n, s; ctx->buf++; /* '\\' */ if (UNLIKELY(ctx->buf == ctx->end)) return 1; @@ -62,14 +62,14 @@ static int fujson_parse_string_buf(pTHX_ fujson_parse_ctx *ctx, fustr *r) { unsigned char x; ctx->buf++; /* '"' */ while (true) { - fustr_reserve(aTHX_ r, 4); + fustr_reserve(r, 4); if (UNLIKELY(ctx->buf == ctx->end)) return 1; x = *ctx->buf; if (UNLIKELY(x == '"')) { ctx->buf++; return 0; } else if (UNLIKELY(x == '\\')) { - if (fujson_parse_string_escape(ctx, r)) return 1; + if (fujson_parse_string_escape(aTHX_ ctx, r)) return 1; } else if (x >= 0x80) { if (UNLIKELY((len = isC9_STRICT_UTF8_CHAR(ctx->buf, ctx->end)) == 0)) return 1; memcpy(r->cur, ctx->buf, len);