Skip to content
Browse files

gh-object-read: return eieio-unbound when reading nil

  • Loading branch information...
1 parent 4a50edb commit 5cddda6583eebfa245647be2b212d89462321785 @tarsius tarsius committed
Showing with 6 additions and 4 deletions.
  1. +6 −4 gh-common.el
View
10 gh-common.el
@@ -36,10 +36,12 @@
())
(defmethod gh-object-read :static ((obj gh-object) data)
- (let ((target (if (object-p obj) obj
- (make-instance obj))))
- (gh-object-read-into target data)
- target))
+ (if data
+ (let ((target (if (object-p obj) obj
+ (make-instance obj))))
+ (gh-object-read-into target data)
+ target)
+ eieio-unbound))
(defmethod gh-object-reader :static ((obj gh-object))
(apply-partially 'gh-object-read obj))

0 comments on commit 5cddda6

Please sign in to comment.
Something went wrong with that request. Please try again.