diff options
Diffstat (limited to 'CleanC.icl')
-rw-r--r-- | CleanC.icl | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -28,6 +28,9 @@ from GenEq import generic gEq :: State :== Int derive gEq CType +derive gEq CParam +instance == CType where (==) x y = gEq{|*|} x y +instance == CParam where (==) x y = gEq{|*|} x y cNewState :: *State cNewState = 42 @@ -99,6 +102,7 @@ cSetReturnType :: !CType -> *State -> *State cSetReturnType Int = cSetReturnType_ 0 cSetReturnType String = cSetReturnType_ 1 cSetReturnType Real = cSetReturnType_ 2 +cSetReturnType Void = cSetReturnType_ 3 cCall_ :: !String !*State -> *State cCall_ f s = code inline { @@ -138,7 +142,8 @@ where cCall` t f [] s # s = cSetReturnType t s # s = cCall_ f s - = cGetParam t s + | t == Void = (CV, s) + | otherwise = cGetParam t s cCall` t f [p:ps] s # s = cPutParam p s = cCall` t f ps s |