Eli Zaretskii <eliz@gnu.org> schrieb am Di., 19. Dez. 2017 um 18:11 Uhr:
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Tue, 19 Dec 2017 00:17:29 +0100
> Cc: Philipp Stephani <phst@google.com>
>
> * src/json.c (json_parse_error): Use Jansson's error code support if
> available.
> ---
>  src/json.c | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/src/json.c b/src/json.c
> index 29e4400fc9..b996cad5a6 100644
> --- a/src/json.c
> +++ b/src/json.c
> @@ -249,15 +249,24 @@ static _Noreturn void
>  json_parse_error (const json_error_t *error)
>  {
>    Lisp_Object symbol;
> -  /* FIXME: Upstream Jansson should have a way to return error codes
> -     without parsing the error messages.  See
> -     https://github.com/akheron/jansson/issues/352.  */
> +#if JANSSON_VERSION_HEX >= 0x020B00
> +  switch (json_error_code (error))

Would it be possible for you to add the few lines which would make
this work on MS-Windows?  It's pretty much boilerplate (you can see
what I did for every jansson function we need, and copycat that), but
if you don't add those few lines, the Windows build will fail to link.


The json_error_code function is inline, is it still necessary to load it from the DLL?