Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- freeInArg :: Arg -> Text -> Text -> ExcCodeGen [Text]
- freeInArgOnError :: Arg -> Text -> Text -> ExcCodeGen [Text]
- freeContainerType :: Transfer -> Type -> Text -> Text -> ExcCodeGen ()
Documentation
freeInArg :: Arg -> Text -> Text -> ExcCodeGen [Text] Source #
Given an input argument to a C callable, and its label in the code, return the list of actions relevant to freeing the memory allocated for the argument (if appropriate, depending on the ownership transfer semantics of the callable).
freeInArgOnError :: Arg -> Text -> Text -> ExcCodeGen [Text] Source #
Same thing as freeInArg, but called in case the call to C didn't succeed. We thus free everything we allocated in preparation for the call, including args that would have been transferred to C.
freeContainerType :: Transfer -> Type -> Text -> Text -> ExcCodeGen () Source #
Free a container and/or the contained elements, depending on the transfer mode.