Fixed a bug in the C types for arrays of channel-ends

This commit is contained in:
Neil Brown 2009-04-01 19:25:19 +00:00
parent 7e7a437a3b
commit a1d9fcdff2
2 changed files with 1 additions and 2 deletions

View File

@ -798,7 +798,7 @@ cgetCType m origT am
(A.Array _ t@(A.Chan {}), _, False, _)
-> call getCType m t A.Original >>* (Pointer . Pointer)
(A.Array _ t@(A.ChanEnd {}), _, False, _)
-> call getCType m t A.Original >>* (Pointer . Pointer)
-> call getCType m t A.Original >>* Pointer
-- All abbrev modes:
(A.Array _ t, _, False, _)

View File

@ -650,7 +650,6 @@ cppgetScalarType _ = Nothing
-- | Changed from GenerateC to change the arrays and the channels
--Also changed to add counted arrays and user protocols
cppgetCType :: Meta -> A.Type -> A.AbbrevMode -> CGen CType
cppgetCType m (A.Array _ t@(A.ChanEnd {})) _ = call getCType m t A.Original >>* Pointer
cppgetCType m t am | isChan t
= do let (chanType, innerT, extra) = case t of
A.ChanEnd A.DirInput _ innerT -> ("csp::AltChanin", innerT, extraEnd)