shithub: mc

Download patch

ref: 5af6cfa9fed7947928ee8eae76cf9f9b62f7b580
parent: 6ea8a68ea95f580877d171bdd4c4ab581a5f0d76
author: Ori Bernstein <[email protected]>
date: Tue Oct 8 17:46:25 EDT 2013

Write out whether a Tyname is generic.

    This allows generic types to be used when imported.

--- a/parse/use.c
+++ b/parse/use.c
@@ -213,6 +213,7 @@
             break;
         case Tyname:
             pickle(ty->name, fd);
+            wrbool(fd, ty->isgeneric);
             wrint(fd, ty->narg);
             for (i = 0; i < ty->narg; i++)
                 wrtype(fd, ty->arg[i]);
@@ -292,6 +293,7 @@
             break;
         case Tyname:
             ty->name = unpickle(fd);
+            ty->isgeneric = rdbool(fd);
             ty->narg = rdint(fd);
             ty->arg = zalloc(ty->narg * sizeof(Type *));
             for (i = 0; i < ty->narg; i++)