shithub: mc

Download patch

ref: dbf997200134ee89ad814ffe13fe20b5505227eb
parent: 1b562ee700be25e69521691e72b73fdc5c887bfa
author: Ori Bernstein <[email protected]>
date: Fri Jul 20 15:13:51 EDT 2012

Correctly pickle alias types.

--- a/parse/pickle.c
+++ b/parse/pickle.c
@@ -189,6 +189,10 @@
         case Tyvar:
             die("Attempting to pickle %s. This will not work.\n", tystr(ty));
             break;
+        case Tyalias:
+            pickle(ty->name, fd);
+            wrtype(fd, ty->sub[0]);
+            break;
         default:
             for (i = 0; i < ty->nsub; i++)
                 wrtype(fd, ty->sub[i]);
@@ -233,6 +237,10 @@
             ty->asize = unpickle(fd);
             break;
         case Tyslice:
+            ty->sub[0] = rdtype(fd);
+            break;
+        case Tyalias:
+            ty->name = unpickle(fd);
             ty->sub[0] = rdtype(fd);
             break;
         default: