From: Eli Zaretskii <eliz@gnu.org>
To: mattias.engdegard@gmail.com
Cc: 60311@debbugs.gnu.org
Subject: bug#60311: json-available-p: make dynamically correct for Windows
Date: Sun, 25 Dec 2022 18:24:54 +0200 [thread overview]
Message-ID: <83v8lz30yx.fsf@gnu.org> (raw)
In-Reply-To: <83wn6f330g.fsf@gnu.org> (message from Eli Zaretskii on Sun, 25 Dec 2022 17:40:47 +0200)
> Cc: 60311@debbugs.gnu.org
> Date: Sun, 25 Dec 2022 17:40:47 +0200
> From: Eli Zaretskii <eliz@gnu.org>
>
> AFAIU, we just need a C implementation of json-available-p, since
> doing this in Lisp doesn't work.
This came out too ambiguous. So here's a more accurate request:
please make your json_available_p use the same code as the first part
of the below:
#ifdef WINDOWSNT
if (!json_initialized)
{
Lisp_Object status;
json_initialized = init_json_functions ();
status = json_initialized ? Qt : Qnil;
Vlibrary_cache = Fcons (Fcons (Qjson, status), Vlibrary_cache);
}
if (!json_initialized)
Fsignal (Qjson_unavailable,
list1 (build_unibyte_string ("jansson library not found")));
#endif
and your ensure_json_available use the second part of the above.
There's no reason to reshuffle the code that works.
Also, please make ensure_json_available specific to WINDOWSNT, so that
we don't pay an extra function call on Posix platforms.
And finally, json--available-p should be defined on all platforms that
compile json.c, not just on WINDOWSNT; it should return t on Posix
platforms.
Thanks.
next prev parent reply other threads:[~2022-12-25 16:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-25 14:32 bug#60311: json-available-p: make dynamically correct for Windows Mattias Engdegård
2022-12-25 15:34 ` Mattias Engdegård
2022-12-25 15:40 ` Eli Zaretskii
2022-12-25 16:24 ` Eli Zaretskii [this message]
2022-12-25 17:26 ` Eli Zaretskii
2022-12-26 12:11 ` Mattias Engdegård
2022-12-26 13:29 ` Eli Zaretskii
2022-12-25 18:43 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83v8lz30yx.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=60311@debbugs.gnu.org \
--cc=mattias.engdegard@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).