jsonapi type fixups
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-06-18T11:48:17Z
Lists: pgsql-hackers
Attachments
- 0001-jsonapi-Use-size_t.patch (text/plain) patch 0001
- 0002-jsonapi-Use-const-char.patch (text/plain) patch 0002
- 0003-parse_manifest-Use-const-char.patch (text/plain) patch 0003
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).
Commits
-
jsonapi: Use const char *
- 15cd9a3881b0 17.0 landed
-
jsonapi: Use size_t
- 0b06bf9fa972 17.0 landed
-
parse_manifest: Use const char *
- 02bbc3c83aec 17.0 landed