branch: externals/compat
commit 03b56ea7990a3bc838aa418eef7bc3465b78788a
Author: Daniel Mendler <m...@daniel-mendler.de>
Commit: Daniel Mendler <m...@daniel-mendler.de>

    Remove :realname
---
 compat-27.el    |  3 +--
 compat-tests.el | 18 +++++++++---------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/compat-27.el b/compat-27.el
index 752a5d82db..8cecfa5b5b 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -161,7 +161,6 @@ any JSON false values."
                (:success t)
                (void-function nil)
                (json-unavailable nil)))
-  :realname compat--internal-json-serialize
   (require 'json)
   (letrec ((fix (lambda (obj)
                   (cond
@@ -222,7 +221,7 @@ OBJECT."
                (:success t)
                (void-function nil)
                (json-unavailable nil)))
-  (insert (apply #'compat--internal-json-serialize object args)))
+  (insert (apply #'json-serialize object args)))
 
 (compat-defun json-parse-string (string &rest args)
   "Parse the JSON STRING into a Lisp object.
diff --git a/compat-tests.el b/compat-tests.el
index e9fb907d9d..a8d5dd331c 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -1265,29 +1265,29 @@ being compared against."
     (should (equal (buffer-string) "{\":key\":[\"abc\",2],\"yek\":true}"))))
 
 (ert-deftest compat-json-serialize ()
-  "Check if `compat--internal-json-serialize' was implemented properly."
+  "Check if `json-serialize' was implemented properly."
   (let ((input-1 '((:key . ["abc" 2]) (yek . t)))
         (input-2 '(:key ["abc" 2] yek t))
         (input-3 (let ((ht (make-hash-table)))
                    (puthash "key" ["abc" 2] ht)
                    (puthash "yek" t ht)
                    ht)))
-    (should (equal (compat--internal-json-serialize input-1)
+    (should (equal (json-serialize input-1)
                    "{\":key\":[\"abc\",2],\"yek\":true}"))
-    (should (equal (compat--internal-json-serialize input-2)
+    (should (equal (json-serialize input-2)
                    "{\"key\":[\"abc\",2],\"yek\":true}"))
-    (should (member (compat--internal-json-serialize input-2)
+    (should (member (json-serialize input-2)
                     '("{\"key\":[\"abc\",2],\"yek\":true}"
                       "{\"yek\":true,\"key\":[\"abc\",2]}")))
-    (should-error (compat--internal-json-serialize '(("a" . 1)))
+    (should-error (json-serialize '(("a" . 1)))
                   :type '(wrong-type-argument symbolp "a"))
-    (should-error (compat--internal-json-serialize '("a" 1))
+    (should-error (json-serialize '("a" 1))
                   :type '(wrong-type-argument symbolp "a"))
-    (should-error (compat--internal-json-serialize '("a" 1 2))
+    (should-error (json-serialize '("a" 1 2))
                   :type '(wrong-type-argument symbolp "a"))
-    (should-error (compat--internal-json-serialize '(:a 1 2))
+    (should-error (json-serialize '(:a 1 2))
                   :type '(wrong-type-argument consp nil))
-    (should-error (compat--internal-json-serialize
+    (should-error (json-serialize
                    (let ((ht (make-hash-table)))
                      (puthash 'a 1 ht)
                      ht))

Reply via email to