ref: fe6beae477034fb2c9ffcdce1204fc844856077e
parent: 73439317b5d3d56ad53adb7b244c7b6426d37990
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Jan 26 22:11:21 EST 2020
we had one enum with a typedef. now we dont.
--- a/git.h
+++ b/git.h
@@ -30,7 +30,7 @@
Nbranch = 32,
};
-typedef enum Type {
+typedef enum {
GNone = 0,
GCommit = 1,
GTree = 2,
@@ -38,7 +38,7 @@
GTag = 4,
GOdelta = 6,
GRdelta = 7,
-} Type;
+};
enum {
Cloaded = 1 << 0,
@@ -82,7 +82,7 @@
struct Object {
/* Git data */
Hash hash;
- Type type;
+ int type;
/* Cache */
int id;
@@ -188,7 +188,7 @@
extern int chattygit;
#pragma varargck type "H" Hash
-#pragma varargck type "T" Type
+#pragma varargck type "T" int
#pragma varargck type "O" Object*
#pragma varargck type "Q" Qid
int Hfmt(Fmt*);
--- a/pack.c
+++ b/pack.c
@@ -427,7 +427,7 @@
{
int c, s, n;
vlong l, p;
- Type t;
+ int t;
Buf b;
p = Boffset(f);
--- a/util.c
+++ b/util.c
@@ -82,10 +82,10 @@
int
Tfmt(Fmt *fmt)
{
- Type t;
+ int t;
int l;
- t = va_arg(fmt->args, Type);
+ t = va_arg(fmt->args, int);
switch(t){
case GNone: l = fmtprint(fmt, "none"); break;
case GCommit: l = fmtprint(fmt, "commit"); break;