Permalink
Browse files

Fix serialization of pairs when they are also subtyped.

  • Loading branch information...
1 parent 29103e6 commit 8da18d128d87b6d2124adfcb29fa7c948f41d868 @feeley feeley committed Oct 29, 2012
Showing with 12 additions and 12 deletions.
  1. +2 −2 include/stamp.h
  2. +10 −10 lib/_system.scm
View
@@ -2,5 +2,5 @@
* Time stamp of last source code repository commit.
*/
-#define ___STAMP_YMD 20121013
-#define ___STAMP_HMS 190232
+#define ___STAMP_YMD 20121029
+#define ___STAMP_HMS 144154
View
@@ -2,7 +2,7 @@
;;; File: "_system.scm"
-;;; Copyright (c) 1994-2011 by Marc Feeley, All Rights Reserved.
+;;; Copyright (c) 1994-2012 by Marc Feeley, All Rights Reserved.
;;;============================================================================
@@ -2538,7 +2538,15 @@
(define (serialize! obj)
(let* ((transform (vector-ref state 4))
(obj (transform obj)))
- (cond ((subtyped? obj)
+ (cond ((pair? obj)
+ (or (share obj)
+ (begin
+ (alloc! obj)
+ (write-u8 (pair-tag))
+ (serialize! (car obj))
+ (serialize! (cdr obj)))))
+
+ ((subtyped? obj)
(cond ((symbol? obj)
(or (share obj)
@@ -2825,14 +2833,6 @@
(else
(cannot-serialize obj))))
- ((pair? obj)
- (or (share obj)
- (begin
- (alloc! obj)
- (write-u8 (pair-tag))
- (serialize! (car obj))
- (serialize! (cdr obj)))))
-
((fixnum? obj)
(cond ((and (>= obj #x00)
(< obj #x0b))

0 comments on commit 8da18d1

Please sign in to comment.