]> git.cworth.org Git - obsolete/notmuch-old/commit
show: don't use hex literals in JSON output
authorThomas Jost <schnouki@schnouki.net>
Sun, 22 Jan 2012 00:20:57 +0000 (01:20 +0100)
committerDavid Bremner <bremner@debian.org>
Sun, 22 Jan 2012 12:41:19 +0000 (08:41 -0400)
commit3f42e87030cf9a30f65ae082af2a53280f6c9100
treed2f2d46543fd218fccf046569e08106689864d58
parentd449c60a73cae2fdd88aa7c255e49d67c5a907ff
show: don't use hex literals in JSON output

JSON does not support hex literals (0x..) so numbers must be formatted
as %d instead of %x.

Currently, the possible values for the gmime error code are 1 (expired
signature), 2 (no public key), 4 (expired key) and 8 (revoked key).
The other possible value is 16 (unsupported algorithm) but obviously
it is much more rare. If this happens, the current code will add
'"errors": 10'. This is valid JSON (it looks like a decimal number)
but it is incorrect (should be 16, not 10).

Since this is just an issue in the JSON encoder, no changes are needed
on the Emacs side (or in other UIs using the JSON output).
notmuch-show.c