Fixed a small problem with the types of arrays of channel-ends in the C++ generation

This commit is contained in:
Neil Brown 2009-02-10 22:21:13 +00:00
parent 6d5c01ac69
commit 18f23bf767

View File

@ -1320,7 +1320,11 @@ cintroduceSpec (A.Specification _ n (A.IsExpr _ am t e))
tell [";\n"] tell [";\n"]
cintroduceSpec (A.Specification _ n (A.IsChannelArray _ (A.Array _ c) cs)) cintroduceSpec (A.Specification _ n (A.IsChannelArray _ (A.Array _ c) cs))
= do call genType c = do call genType c
tell ["*"] case c of
A.Chan _ _ -> tell ["*"]
-- Channel ends don't need an extra indirection; in C++ they are not
-- pointers, and in C they are already pointers
_ -> return ()
call genArrayStoreName n call genArrayStoreName n
tell ["[]={"] tell ["[]={"]
seqComma (map (call genVariable) cs) seqComma (map (call genVariable) cs)