[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#60311: json-available-p: make dynamically correct for Windows
From: |
Mattias Engdegård |
Subject: |
bug#60311: json-available-p: make dynamically correct for Windows |
Date: |
Sun, 25 Dec 2022 15:32:06 +0100 |
The implementation of `json-available-p`,
(and (fboundp 'json-serialize)
(condition-case nil
(json-serialize t)
(:success t)
(json-unavailable nil))))
probably isn't quite right on Windows: `json-serialize` is pure so it will be
called at compile time and the result, "true", used in the code (actually not
even that since the result is never used). Thus, if libjansson could not be
loaded during actual Emacs use (as opposed to when Emacs was built), this would
never be detected and json-available-p would still return t.
The patch below should take care of this. Would someone please help testing it
on Windows?
json-available-p.diff
Description: Binary data
- bug#60311: json-available-p: make dynamically correct for Windows,
Mattias Engdegård <=