From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | jsonapi type fixups |
Date: | 2024-06-18 11:48:17 |
Message-ID: | f732b014-f614-4600-a437-dba5a2c3738b@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I have this patch series that fixes up the types of the new incremental
JSON API a bit. Specifically, it uses "const" throughout so that the
top-level entry points such as pg_parse_json_incremental() can declare
their arguments as const char * instead of just char *. This just
works, it doesn't require any new casting tricks. In fact, it removes a
few unconstify() calls.
Also, a few arguments and variables that relate to object sizes should
be size_t rather than int. At this point, this mainly makes the API
better self-documenting. I don't think it actually works to parse
larger than 2 GB chunks (not tested).
Attachment | Content-Type | Size |
---|---|---|
0001-jsonapi-Use-size_t.patch | text/plain | 6.7 KB |
0002-jsonapi-Use-const-char.patch | text/plain | 12.0 KB |
0003-parse_manifest-Use-const-char.patch | text/plain | 10.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alena Rybakina | 2024-06-18 11:56:34 | Re: post-freeze damage control |
Previous Message | Ranier Vilela | 2024-06-18 11:43:23 | Re: replace strtok() |