From 37ff130ec91272975d78d189b6067e46b3b2914f Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Wed, 1 Apr 2009 19:58:30 +0000 Subject: [PATCH] Stopped static being generated in front of typedef --- backends/GenerateC.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backends/GenerateC.hs b/backends/GenerateC.hs index 6f79a14..e55062d 100644 --- a/backends/GenerateC.hs +++ b/backends/GenerateC.hs @@ -1408,9 +1408,8 @@ cintroduceSpec _ (A.Specification _ _ (A.DataType _ _)) = return () cintroduceSpec _ (A.Specification _ _ (A.RecordType _ _ _)) = return () cintroduceSpec _ (A.Specification _ _ (A.ChanBundleType {})) = return () cintroduceSpec _ (A.Specification _ n (A.Protocol _ _)) = return () -cintroduceSpec lvl (A.Specification _ n (A.ProtocolCase _ ts)) - = do genStatic lvl n - tell ["typedef enum{"] +cintroduceSpec _ (A.Specification _ n (A.ProtocolCase _ ts)) + = do tell ["typedef enum{"] seqComma [genName tag >> tell ["_"] >> genName n | (tag, _) <- ts] -- You aren't allowed to have an empty enum. when (ts == []) $