[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/xml-rpc a190759da8 41/64: Merge pull request #2 from mdorm
From: |
Stefan Kangas |
Subject: |
[nongnu] elpa/xml-rpc a190759da8 41/64: Merge pull request #2 from mdorman/master |
Date: |
Fri, 31 Dec 2021 20:11:08 -0500 (EST) |
branch: elpa/xml-rpc
commit a190759da8765d3b22ceb6774cefc610fda404d8
Merge: 7a4ea6c22e e4002b8502
Author: Mark A. Hershberger <mah@everybody.org>
Commit: Mark A. Hershberger <mah@everybody.org>
Merge pull request #2 from mdorman/master
Fix struct recognition
---
xml-rpc-test.el | 10 ++++++++++
xml-rpc.el | 16 +++++++++++++++-
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/xml-rpc-test.el b/xml-rpc-test.el
new file mode 100644
index 0000000000..c84c47a728
--- /dev/null
+++ b/xml-rpc-test.el
@@ -0,0 +1,10 @@
+(require 'ert)
+
+(load-file "xml-rpc.el")
+
+(ert-deftest test-xml-rpc-value-structp ()
+ "Test whether xml-rpc-value-structp operates correctly"
+ (should (eq (xml-rpc-value-structp ()) t))
+ (should (eq (xml-rpc-value-structp '(("foo"))) t))
+ (should (eq (xml-rpc-value-structp '(("foo" . "bar"))) t))
+ (should (eq (xml-rpc-value-structp '(("foo" :datetime (12345 12345)))) t)))
diff --git a/xml-rpc.el b/xml-rpc.el
index 984ebe9408..33dc07d933 100644
--- a/xml-rpc.el
+++ b/xml-rpc.el
@@ -252,6 +252,20 @@ Set it higher to get some info in the *Messages* buffer"
"A list of extra headers to send with the next request.
Should be an assoc list of headers/contents. See `url-request-extra-headers'")
+(defsubst xml-rpc-valuep (value)
+ "Return t if VALUE is any sort of xml-rpc structure.
+
+Return nil otherwise."
+ (or (xml-rpc-value-intp value)
+ (xml-rpc-value-doublep value)
+ (xml-rpc-value-stringp value)
+ (xml-rpc-value-structp value)
+ (xml-rpc-value-arrayp value)
+ (xml-rpc-value-vectorp value)
+ (xml-rpc-value-booleanp value)
+ (xml-rpc-value-datetimep value)
+ (xml-rpc-value-base64p value)))
+
;;
;; Value type handling functions
;;
@@ -281,7 +295,7 @@ Should be an assoc list of headers/contents. See
`url-request-extra-headers'")
(setq curval (car-safe vals))
(consp curval)
(stringp (car-safe curval))
- (not (listp (cdr curval)))))
+ (xml-rpc-valuep (cdr curval))))
(setq vals (cdr-safe vals)))
result)))
- [nongnu] elpa/xml-rpc 80809710fc 31/64: Integrate patches from Stefan Kangas: * add support for i8 * fix byte compile warnings, (continued)
- [nongnu] elpa/xml-rpc 80809710fc 31/64: Integrate patches from Stefan Kangas: * add support for i8 * fix byte compile warnings, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 6019352966 39/64: Add the beginning of rudimentary tests., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 7a4ea6c22e 38/64: History update and version bump, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 86c73a69fa 48/64: Use lexical-binding, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc bc781d6edd 51/64: Merge pull request #15 from skangas/lexical-binding, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 960b2510e3 61/64: Update README, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc bc331d010b 56/64: Test CI, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 9fa979302b 63/64: Merge pull request #17 from xml-rpc-el/ci, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 7b4d6c4820 04/64: Update copyright. (xml-rpc-response-errorp): make safe., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 4efc188b7f 53/64: Merge pull request #13 from skangas/version-number, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc a190759da8 41/64: Merge pull request #2 from mdorman/master,
Stefan Kangas <=
- [nongnu] elpa/xml-rpc 7bcf1427b7 07/64: (xml-rpc-value-datep): New function to determine if a string is an ISO date. (xml-rpc-value-to-xml-list): Add support for vector inputs. Add support for strings that are really dates., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc bfa3f97259 09/64: Clean up long lines, address bugs, use string-to-number instead of obsolete string-to-int., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 417f3d2a94 12/64: (xml-entity-alist): provide a definition for really old versions of xml.el. (xml-rpc-use-coding-system): Make unicode variables dependent on the existence of utf-8 coding-system. Generally allow use of Emacs that don't understand Unicode -- although the HTTP headers still claim to be UTF-8. Update backwards-compatibility code after testing against XEmacs21., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 725bc20829 14/64: Bump the version. (xml-rpc-fault-string, xml-rpc-fault-code): Defvar some previously un-declared vars. (xml-rpc-value-intp, xml-rpc-value-doublep) (xml-rpc-value-stringp): Change from defun to defsubst for consistency. (xml-rpc-request, xml-rpc-list-to-value, xml-rpc-clean): Fix compilation warnings, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 68d54c3c0f 11/64: (xml-rpc-xml-list-to-value): Make sure XML-RPC's dateTime.iso8601 is handled. (xml-rpc-datetime-to-string): Grab the right piece of data. (xml-rpc-request-process-buffer): Kill buffer if not debugging. (timezone-parse-date): Conditionally override if the version we have can't handle iso8601 basic format., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc cd88a4f5fa 16/64: (xml-rpc-xml-list-to-value): Handle nil for an int gracefully. Consolidate dateTime parsing. (xml-rpc-datetime-to-string): Wordpress expects dateTime elements to match the XML-RPC spec and not ISO8601 spec. (xml-rpc-value-to-xml-list): Switch to iso8601 for default., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc d3d4460ec9 15/64: typo, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 28dfbff291 18/64: Add submit-bug function and mode toggling functionality., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 481ed72dff 22/64: update bug reporting function., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc c20aa6359a 29/64: bump version for continued development, Stefan Kangas, 2021/12/31