From d36503e15de78239c09fe25db40c7c189effda2a Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Mon, 13 Apr 2009 20:37:21 +0000 Subject: [PATCH] Fixed a couple of problems in the backend with channel bundles --- backends/GenerateC.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backends/GenerateC.hs b/backends/GenerateC.hs index 905ad29..2e9776d 100644 --- a/backends/GenerateC.hs +++ b/backends/GenerateC.hs @@ -402,6 +402,8 @@ cgenBytesIn m t v = do tell ["sizeof("] genType t tell [")"] + genBytesIn' t@(A.ChanDataType {}) + = tell ["sizeof(mt_cb_t*)"] genBytesIn' (A.Mobile t@(A.Array {})) = genBytesIn' t genBytesIn' (A.Mobile _) = tell ["sizeof(void*)"] @@ -746,10 +748,10 @@ cgenVariableWithAM checkValid v am fct , ct) A.ChanDataType {} -> return - (do tell ["(&("] + (do tell ["(&(("] call genVariable' v A.Original (const $ Plain "mt_cb_t") let ind = findIndex ((== fieldName) . fst) fs - tell [".channels[", maybe "" show ind, "]))"] + tell [").channels[", maybe "" show ind, "]))"] , ct) A.SubscriptFromFor m' subCheck start count -> do ct <- details v