This patch is from the upstream pull request https://github.com/chadaustin/sajson/pull/54. It fixes linking with GCC. diff --git a/include/sajson.h b/include/sajson.h index 8b4e05a..1bd045b 100644 --- a/include/sajson.h +++ b/include/sajson.h @@ -138,12 +138,17 @@ constexpr inline size_t make_element(tag t, size_t value) { // header. This trick courtesy of Rich Geldreich's Purple JSON parser. template struct globals_struct { + static const unsigned char parse_flags[256]; +}; +typedef globals_struct<> globals; + // clang-format off // bit 0 (1) - set if: plain ASCII string character // bit 1 (2) - set if: whitespace // bit 4 (0x10) - set if: 0-9 e E . - constexpr static const uint8_t parse_flags[256] = { + template + const unsigned char globals_struct::parse_flags[256] = { // 0 1 2 3 4 5 6 7 8 9 A B C D E F 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 0, 0, // 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1 @@ -162,15 +167,13 @@ struct globals_struct { }; // clang-format on -}; -typedef globals_struct<> globals; -constexpr inline bool is_plain_string_character(char c) { +inline bool is_plain_string_character(char c) { // return c >= 0x20 && c <= 0x7f && c != 0x22 && c != 0x5c; return (globals::parse_flags[static_cast(c)] & 1) != 0; } -constexpr inline bool is_whitespace(char c) { +inline bool is_whitespace(char c) { // return c == '\r' || c == '\n' || c == '\t' || c == ' '; return (globals::parse_flags[static_cast(c)] & 2) != 0; } ix/log/gnu/packages/patches/guile-2.2-skip-so-test.patch'>
ystem rakudo-build-system Signed-off-by: Ludovic Courtès <ludo@gnu.org>
AgeCommit message (Expand)Author
Morgan Smith
2020-12-04etc: snippets: Fix name extraction....* etc/snippets/text-mode/guix-commit-message-add-package: Fix name extraction. This is a follow-up to 988a49c78ef19ad25cef543e2059a19db04bbd36. Nicolas Goaziou
2020-12-04etc: snippets: Fix name extraction....* etc/snippets/text-mode/guix-commit-message-update-package: Since git commit mode is not derived from any Lisp mode, so-called sexp or symbols do not include the period character. As a consequence, names including versions are not properly extracted. Also use more idiomatic (goto-char (point-min)) instead of (beginning-of-buffer). Nicolas Goaziou
2020-11-25etc: snippets: Fix "gnu: Add ..." name when prefilling Common Lisp commits me......* etc/snippets/text-mode/guix-commit-message-add-cl-package: Fix name and simplify the "New variables" line. Pierre Neidhardt
2020-11-23etc: snippets: Prefill Common Lisp package names....* etc/snippets/text-mode/guix-commit-message-add-cl-package: New file. Pierre Neidhardt
2020-11-23etc: snippets: Fix package name extraction....* etc/snippets/text-mode/guix-commit-message-add-package: Properly extract name when the diff contains a very short `define-public ...` above the actual new package. This can happen when the above package is a small inherited definition or cl/ecl package. Pierre Neidhardt
2019-05-09Add (guix bzr-download)....* guix/bzr-download.scm, guix/build/bzr.scm, etc/snippets/scheme-mode/guix-bzr-reference: New files. * Makefile.am (MODULES): Add them. * etc/snippets/scheme-mode/guix-origin: Add "bzr-fetch" to the origin choices. Maxim Cournoyer
2019-03-26etc: Add "rename" snippet....* etc/snippets/text-mode/guix-commit-message-rename-package: New file. Pierre Neidhardt
2019-03-08etc: snippets: Prefill package name....* etc/snippets/text-mode/guix-commit-message-add-package: Extract package name from diff. Ricardo Wurmus
2019-03-07etc: snippets: Prefill package name and version....* etc/snippets/text-mode/guix-commit-message-update-package: Extract package name and version from git diff output. Ricardo Wurmus
2018-10-10etc: Use git-file-name if origin is git-fetch....* etc/snippets/scheme-mode/guix-origin: Use git-file-name. Pierre Neidhardt