git conversion of:
Tue Mar 8 22:31:07 CET 2011 Bas van Dijk <v.dijk.bas@gmail.com>
* Generalize the type of Foreign.Marshal.Utils.maybeNew
This makes it consistent with maybeWith
--
-- * the 'nullPtr' is used to represent 'Nothing'
--
-maybeNew :: ( a -> IO (Ptr a))
- -> (Maybe a -> IO (Ptr a))
+maybeNew :: ( a -> IO (Ptr b))
+ -> (Maybe a -> IO (Ptr b))
maybeNew = maybe (return nullPtr)
-- |Converts a @withXXX@ combinator into one marshalling a value wrapped